|Remote Debugging with Eclipse CDT - Debug an Application that is Loaded Dynamically [message #1064839]
||Fri, 21 June 2013 10:24
| Cindy Fähnrich
Registered: June 2013
I am trying to do remote debugging in CDT Environment of Eclipse Juno on Windows 7, whereas the remote machine is running under Linux. So much to the general purpose, unfortunately the exact setting is much more complicated so that I have been struggling for over a week now with this issue and none of the solutions provided in search results is sufficient.
So, here is my exact setting (very sorry for that long text!):
- I have a C++ application Y which I develop and build on machine A.
- I move the .so file (debug build) to machine B, which is running under Linux. I do not have the source code available there.
- I am not starting my application Y explicitely on machine B. There exists another application Z that is started first, then I trigger a specific function so that my application Y is loaded dynamically. Actually it is done from a database stored procedure, but I will leave out these details to avoid fully puzzling you...
- I have my local machine C running under Windows from which I want to debug. I have a copy of Y's source code and executable there, but not from application Z.
- I cannot change these settings.
Now, I have installed gdbserver (GNU gdbserver (GDB) SUSE (7.2-3.3)) on machine B, gdb on machine C - compiled it with matching target and host as found in common tutorials, the version output says the following:
GNU gdb (GDB) 18.104.22.16830508-cvs (cygwin-special)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-cygwin".
I installed the Eclipse plugin for running and debugging remote applications. I have set up everything as suggested in the eclipse wiki.
When I now start my debugging session, gdbserver and application Z are successfully started on machine B from within Eclipse. I can also trigger my application Y by invoking the stored procedure. But the following problems and questions arise here:
- When starting the debugger, it says:
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
Created trace state variable $trace_timestamp for target's variable 1.
I have read something about including shared libraries somewhere, but I did not fully understand what shared libraries are meant here. Maybe that issue is also related to the next point.
- I do not know where to include my source code so that it is available for setting breakpoints etc. during the debugging session. Since I do not have an Eclipse project, I know I just need to include the path to it somewhere. I added the code's root folder to the debug configuration's source lookup path, but this does not seem to work.
- In Eclipse's debug configuration, I enter the path to the C++ application I want to start. For the command on the remote machine, I need to enter application Z since I cannot start my application Y explicitely. So I entered my application Y's path in the field for my local C++ application. Is that correct?
- When starting the debugging session and triggering my application Y from outside, nothing happens in the debugger. My application Y is running and delivers results, but I do not get anything in the debugger's console. I would like to set breakpoints, but since my source code is not found I do not know how...
I tried to do a gdb debugging directly on the remote machine (starting applicatioin Z, triggering application Y from outside) and tried to set breakpoints at specific functions from my application Y. But this did not work either. Nevertheless, I did not get the warning mentioned above.
So now I am stuck here and do not know what to do. I have read lots of threads and blogs, but none of them has such a specific setting as I have, so there is always missing some detail.
I really, really, really appreciate your help.
Powered by FUDForum
. Page generated in 0.12290 seconds