Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Eclipse & lldb-mi (macOSX) breakpoint in dynamically loaded library at runtime

Dear CDT Team,

My scenario is as follows:

I am developing a C++ dynamically loaded library for PHP which is loaded at run-time.  I need to set a breakpoint at a line inside the library.  I am working w/ MacOSX and the lldb-mi interface. 

 

Unfortunately, I have not figured out a way to get lldb-mi to load the symbols before the breakpoint is set, and lldb-mi is refusing to add the pending breakpoint.

  1. I have not found the equivalent of .lldbinit to auto-execute target modules add CDT.so.
  2. I have not found a way to have the Eclipse/CDT lldb-mi interface to either set target modules add CDT.so before setting the breakpoint (which will work).
  3. I have not found a way to have the Eclipse/CDT lldb-mi interface to use the -f flag (future/pending flag), which I have confirmed to work when running lldb-mi from the console.

eg: -break-insert -f /Library/WebServer/Documents/cdtweb/ro/ComponentManager.cpp:90

 

Here is the lldb/gdb trace log from Eclipse:

cdt-dev@eclipse.org215,497 24-break-insert /Library/WebServer/Documents/cdtweb/ro/ComponentManager.cpp:90

215,498 24^error,msg="Command 'break-insert'. Breakpoint location '/Library/WebServer/Documents/cdtweb/ro/ComponentManager.cpp:90' not found"

 

Is there a correct way to debug this issue with Eclipse/CDT/lldb-mi that I’m simply

 

overlooking, or do I need to start hacking on the CDT/lldb-mi integration to add a -f / pending breakpoint option?

 

As for gdb, I haven’t yet figured out how to even get gdb to break inside the dynamically loaded library from the command line, so I don’t think I can go that route with Eclipse.

 

Regards,

Marius


Back to the top