Skip to main content



      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 07:52 Go to next message
Eclipse UserFriend
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 09:16 Go to previous messageGo to next message
Eclipse UserFriend
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 08:01 Go to previous message
Eclipse UserFriend
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: Sun Jul 06 10:52:00 EDT 2025

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

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

Back to the top