|
Re: Subclassing GdbLaunchDelegate causes "Error in final launch sequence" [message #1699224 is a reply to message #1698978] |
Mon, 22 June 2015 17:32 |
Marc Khouzam 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
|
|
|
Powered by
FUDForum. Page generated in 0.03346 seconds