Skip to main content



      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 12:27 Go to next message
Eclipse UserFriend
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 10:05 Go to previous messageGo to next message
Eclipse UserFriend
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 10:51 Go to previous messageGo to next message
Eclipse UserFriend
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 11:07 Go to previous messageGo to next message
Eclipse UserFriend
> <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 12:29 Go to previous message
Eclipse UserFriend
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: Tue Jun 17 06:56:43 EDT 2025

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

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

Back to the top