Monday 15 February 2010

gdb - Remote Debugging with Eclipse CDT - Debug an Application that is Loaded Dynamically -


I am trying to do remote debugging in CDT environment of Eclipse Juno on Windows 7, while the remote machine is running under Linux Used to be. For the general purpose, unfortunately, the exact setting is very complex so that I am struggling for more than a week with this issue and none of the solutions given in the search results is adequate.

So, this is my exact setting (I am very sorry for that long text!):

  • I have a C + + application that I have on machine A Develop and build.
  • I .so file (debug build) machine B, which is running under Linux. I do not have source code available
  • I'm not clearly starting my machine on Machine B. Another application Jade already starts, so I triggered a special function so that my app Y is dynamically loaded, in fact this is done through a database stored procedure, but I completely bother you I will leave these details to avoid ...
  • I have my local machine running under Windows from which I want to debug. I have a copy of the source code of Y and is executable there, but not the application Z.
  • I can not change these settings

    Now, I have compiled with gdbserver (GDB machine G (GDB) SUSE (7.2-3.3) on C-GDB machine - it was compiled with matching target and host as In the General Tutorials, the version output is called the following:

      GNU GDB 7.6.50.20130508-CVS (Signin-Special) Copyright (C) 2013 Free Software Foundation, Inc. License GPLV 3 +: GNU GPL version 3 or later & http; //gnu.org/licenses/gpl.html> It's free software: You are free to change and redistribute it. To the extent allowed by law, there is no warranty Type "show copy" and type "show warranty" for details. This GDB was configured as "i686-cygwin"   

    I have installed the Eclipse plugin to run and debug remote applications. I've suggested that I've set up everything when I'm starting my debugging session now, gdbserver and AppZ have successfully started eclipse on Machine B. I can also trigger my application by using the stored procedure. But the following problems and questions arise here:

    • When the debugger starts, it says:

        Warning: Finding dynamic link break breakpoint function hopeless at. The GDB shared library will not be able to debug beginners and will track clearly loaded dynamic code. The state variable $ trace_timestamp was detected for variable 1 of the target.   

      I have read something about adding the shared libraries, but I did not fully understand what shared libraries shared here could mean. This issue is also related to the next point.

    • I do not know where my source code is included so that it is available for installation of breakpoints etc. during the debugging session. Since I do not have any eclipse project, I know that I have to include it somewhere. I've added the root folder of the code to the source lookup of the debug configuration, but it does not seem to work.
    • In the debug configuration of Eclipse, the path of the C ++ application that I want to start, for the command on the remote machine, I need to enter the application z. Because I start my application clearly I can not enter the path of Y in the field for my local C ++ application. Is that right?
    • When the debugging session starts and my application triggers Y from the outside, nothing in the debugger is running my app Y and gives results, but I do not get anything in the debugger console I would like to set a breakpoint, but since my source code is not found, I do not know how ...

      I tried to debug GDB directly on the remote machine (applicant jade, outside Y wai Trigger) and my application tried to set breakpoints on specific functions of y. But it was not working either. Even then, I did not get the warning mentioned above.

      So now I am stuck here and do not know what to do. I have read so many threads and blogs, but none of these is the specific setting I have, so there is always some detail missing

      I really, really appreciate your help in fact I do Instead of breakpoints, put sleeping in your code somewhere, attach it to GDB, while it is asleep.

No comments:

Post a Comment