Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Subclassing GdbLaunchDelegate causes "Error in final launch sequence"
icon5.gif  Subclassing GdbLaunchDelegate causes "Error in final launch sequence" [message #1698978] Fri, 19 June 2015 09:29 Go to next message
Tomas Simicek is currently offline Tomas SimicekFriend
Messages: 1
Registered: June 2015
Junior Member
I'm working on plug-in which should display custom information in Debug View. It uses DSF-GDB. So far I've tried to use approach with subclassing org.eclipse.cdt.dsf.gdb.internal.ui.viewmodel.launch.ThreadVMNode (through subclassed GdbAdapterFactory, GdbViewModelAdapter, etc.).

I've created MyLaunchDelegate which subclasess GdbLaunchDelegate like this:

<extension
     point="org.eclipse.debug.core.launchDelegates">
  <launchDelegate            
        delegate="com.myExample.launch.MyLaunchDelegate"
        id="com.myExample.myLaunchDelegate"
        modes="debug"
        name="My GDB jlink"
        sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer"
        sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
        type="ilg.gnuarmeclipse.debug.gdbjtag.jlink.launchConfigurationType">
  </launchDelegate>


But even if MyLaunchDelegate just calls GdbLaunchDelegate constructor (for now), I get this error after running debug:

Error in final launch sequence
Failed to execute MI command:
   -exec-run
Error message from debugger back end:
Don't know how to run.  Try "help target".


Do someone know where might be a problem? Thanks.
Re: Subclassing GdbLaunchDelegate causes "Error in final launch sequence" [message #1699224 is a reply to message #1698978] Mon, 22 June 2015 17:32 Go to previous message
Marc Khouzam is currently offline Marc KhouzamFriend
Messages: 357
Registered: July 2009
Senior Member
This is because your launch is probably using a local debug session configuration, while you probably want a hardware or remote debug session.
So, currently, your CDT plugin ends up sending commands to GDB that are not supported in your case. You can see these errors by looking
at the interaction between CDT and GDB using the 'gdb traces':
https://wiki.eclipse.org/CDT/User/FAQ#I.27ve_been_asked_for_.27gdb_traces.27.2C_where_can_I_find_them.3F

If you look at GdbLaunchDelegate, it calls FinalLaunchSequence, which has different steps to execute. Each of these steps contributes
to setting up GDB for the debug session. But different types of sessions require different initialization steps. For example, for a local
session, an "-exec-run" command is sent to GDB, while for a remote session a "-target-select <ip>:<port>" is sent, and later an "-exec-continue".

You have to make sure the correct steps are being triggered to initialize GDB the way you want/need.
I recommend you follow the progress of FinalLaunchSequence, which may call DebugNewProcessSequence,
which can then call StartOrRestartProcessSequence_7_0 before completing GDB's initialization.
You can then see what steps should and should not be used and update your code to properly trigger
the right steps.

Before forcibly changing the steps though, I recommend you look at two settings that play a role
in choosing the steps:
IGDBBackend.getSessionType() (this says if the session is a local, remote, or core session)
IGDBBackend.getIsAttachedSession() (this says if GDB will be requested to attach to process instead of starting it)

If you follow the trail for these two methods, you will see that it is in the launch tabs that the type of session
is specified, e.g., constructor to LocalApplicationCDebuggerTab() compared to the constructor of RemoteApplicationCDebuggerTab()

I hope this helps.

Marc

Previous Topic:Error 193
Next Topic:Is eclipse DSF framework some GDB MI enviroment ?
Goto Forum:
  


Current Time: Sat Apr 27 02:33:12 GMT 2024

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

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

Back to the top