Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » how to remote debug a shared library?
how to remote debug a shared library? [message #823004] Sat, 17 March 2012 16:27 Go to next message
Andrew Wiles is currently offline Andrew WilesFriend
Messages: 13
Registered: August 2011
Location: SH
Junior Member
Hi all,
my dev machine : Win7,CDT
target machine : Linux
currently, i
1)write code in Eclipse/CDT on my dev machine,
2)then upload it to the linux,
3)then compile it into a shared library(not an executable),
4)and run a program which will load my library, to test whether my code works as expected.
here my question is how can i debug my code from within the CDT on my win7?
the code is never compiled in the CDT as it can only be compiled on the linux.

thanks
Re: how to remote debug a shared library? [message #824302 is a reply to message #823004] Mon, 19 March 2012 14:05 Go to previous messageGo to next message
Marc Khouzam is currently offline Marc KhouzamFriend
Messages: 357
Registered: July 2009
Senior Member
You should be able to do a simple remote debug session and set a breakpoint into your code:
http://wiki.eclipse.org/CDT/User/FAQ#How_do_I_debug_a_remote_application.3F

Marc
Re: how to remote debug a shared library? [message #824336 is a reply to message #824302] Mon, 19 March 2012 14:51 Go to previous messageGo to next message
Andrew Wiles is currently offline Andrew WilesFriend
Messages: 13
Registered: August 2011
Location: SH
Junior Member
hi Marc,
whether only the 3rd option "Remote Attach Launch" apply to my situation.
and i'm confused about this command:
remote> <gdbserverPath>/gdbserver --multi :<port>
thanks
Re: how to remote debug a shared library? [message #824346 is a reply to message #824336] Mon, 19 March 2012 15:07 Go to previous messageGo to next message
Marc Khouzam is currently offline Marc KhouzamFriend
Messages: 357
Registered: July 2009
Senior Member
> <gdbserverPath>/gdbserver --multi :<port>

For example, on your linux machine, start gdbserver like this:

gdbserver --multi :9999

Then in eclipse, set the launch to use the IP address of your Linux machine and the port to 9999
Re: how to remote debug a shared library? [message #824408 is a reply to message #824346] Mon, 19 March 2012 16:29 Go to previous message
Andrew Wiles is currently offline Andrew WilesFriend
Messages: 13
Registered: August 2011
Location: SH
Junior Member
1.it seems the gdbserver on my linux does NOT accept the --multi option.
2.i made the gdbserver attach the process, then i lauched the debug perspective, but was told that "No source available for "0x907b86".
although sad, but this is wat not unexpected. the source files can NOT be compiled on my host, they are compiled on linux into a shared library, which i think makes things complicated.
thanks.
Previous Topic:Error launching external scanner info generator (g++ -E -P -v -dD /home/tabor/workspace/.metadata/.p
Next Topic:CDT plugin for eclipse indigo
Goto Forum:
  


Current Time: Fri Apr 26 18:52:16 GMT 2024

Powered by FUDForum. Page generated in 0.03327 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top