Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse & lldb-mi (macOSX) breakpoint in dynamically loaded library at runtime
Eclipse & lldb-mi (macOSX) breakpoint in dynamically loaded library at runtime [message #1794030] Wed, 22 August 2018 16:59 Go to next message
Marius-Paul Dumitrean is currently offline Marius-Paul DumitreanFriend
Messages: 1
Registered: August 2018
Junior Member
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.
I have not found the equivalent of .lldbinit to auto-execute target modules add CDT.so.
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).
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/console, so I don't think I can go that route with Eclipse.

Regards,
Marius
Re: Eclipse & lldb-mi (macOSX) breakpoint in dynamically loaded library at runtime [message #1795140 is a reply to message #1794030] Sun, 16 September 2018 19:38 Go to previous message
Marc-André Laperle is currently offline Marc-André LaperleFriend
Messages: 233
Registered: July 2009
Senior Member
Hi Marius, could you file a bug for this? https://bugs.eclipse.org/bugs/enter_bug.cgi?product=CDT
I should be able to address this soon (at least adding the -f in CDT). Basically, we'll need a LLDB-specific command factory so be able to tweak the -break-insert command (I have another patch that adds the factory). I think on the LLDB side, it's probably because "-gdb-set breakpoint pending on" is not implemented. We can file an issue for that too and works towards fixing it upstream.
Previous Topic:How to filter C static functions prototypes from Eclipse quick outline popup Ask Question
Next Topic:Error :com.spotify.docker.client.DockerConfigReader - No appenders could be found for logger
Goto Forum:
  


Current Time: Mon Sep 24 06:05:24 GMT 2018

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

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

Back to the top