Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » How to get the binary being debugged in DSF
How to get the binary being debugged in DSF [message #1256453] Tue, 25 February 2014 12:52 Go to next message
Marcin   is currently offline Marcin Friend
Messages: 8
Registered: October 2011
Junior Member
I am looking for the API that will allow me to get access to the binary file being debugged in a given DSF session.

In the CDT standard debugger model I was able to get it using the following code:

CDebugTarget dt = (CDebugTarget) ((IDebugElement) DebugUITools.getDebugContext().getAdapter(IDebugElement.class)).getDebugTarget();
IBinaryObject object = dt.getBinaryFile();


Is there any similar way to get the binary knowing the current DSFSession ID?
Re: How to get the binary being debugged in DSF [message #1256517 is a reply to message #1256453] Tue, 25 February 2014 14:16 Go to previous messageGo to next message
Marc Khouzam is currently offline Marc KhouzamFriend
Messages: 357
Registered: July 2009
Senior Member
With DSF things are a little trickier because we support multi-process debugging.
If you want to find the binary that is specified in the launch, you can use
     DsfServicesTracker tracker = new DsfServicesTracker(GdbPlugin.getBundleContext(), fSession.getId());
     IGDBBackend backend = tracker.getService(IGDBBackend.class);
     IPath execPath = backend.getProgramPath();


There is currently no way to find ask for the binary used per process in a multi-process session.

Marc
Re: How to get the binary being debugged in DSF [message #1258506 is a reply to message #1256517] Thu, 27 February 2014 13:01 Go to previous message
Marcin   is currently offline Marcin Friend
Messages: 8
Registered: October 2011
Junior Member
That's it. Thank you!
Marcin
Previous Topic:How to enable source level debugging with gdb?
Next Topic:Error while launching command: gdb --version
Goto Forum:
  


Current Time: Fri Mar 29 14:06:01 GMT 2024

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

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

Back to the top