Breakpoints in shared libraries loaded at runtime [message #1018331] |
Wed, 13 March 2013 12:12  |
Eclipse User |
|
|
|
Hello,
Trying to debug a shared library I ran into the following problem:
I start my debug session, load the shared library, insert breakpoints in it and debug. I end the session and restart it. The breakpoints that were in the shared library are not enabled after I load the shared library again.
Debugging this I noticed that for the shared libraries that are linked, Eclipse would issue a break insert comamnd to GDB for those breakpoints, but for the library I load at runtime, there is no break insert command.
When I load the library, I issue an shared library event, but it doesn't result in an attempt from GDB to insert the breakpoints. I am using CDT/CDI.
Is this a known Eclipse CDT issue, or there is another event type that I need to trigger when adding shared libraries at runtime. (The corresponding GDB action for loading this library is to issue an add-symbol-file command).
The codes that fires the event looks like this:
MIShared shared = new MIShared(from, to, true, file);
SharedLibrary library = new SharedLibrary(target, shared);
Session session = (Session)target.getSession();
ICDIEvent event = new CreatedEvent(session, library);
EventManager eventManager = (EventManager) session.getEventManager();
eventManager.fireEvents(new ICDIEvent[] {event});
Thank you,
Catalin
|
|
|
|
|
Re: Breakpoints in shared libraries loaded at runtime [message #1031342 is a reply to message #1018331] |
Mon, 01 April 2013 11:48  |
Eclipse User |
|
|
|
Hello again.
In fact, it seems that the
org.eclipse.cdt.debug.mi.core plugin doesn't have this functionality. My version is 7.2.0.201209170703.
at org.eclipse.cdt.debug.mi.core.command.MIBreakInsert the -f flag that is available from gdb6.5 is not implemented/supported.
Unfortunately the "set breakpoint pending on" command in GDB only affects the CLI break command so there was no way out for me.
I think the way out would be for CDT to set -f by default for -break-insert.
|
|
|
Powered by
FUDForum. Page generated in 0.04452 seconds