The public GDB now supports non-stop for linux.
This patch fixes the version number we were using and allows the user to click the non-stop checkbox in the launch.
When non-stop mode is requested by the user, the FinalLaunchSequence now issues:
maint set linux-async 1
set breakpoint always-inserted 1
-gdb-set non-stop on
Ultimately, with the official GDB release, only the last command should be needed.
This patch adds more usage of the IProcesses service. I believe the patch is
backwards compatible with our 1.0 release (not with the latest HEAD). The
patch does the following:
1- cleanup context hierarchy to become:
MIControlDMContext
|
MIProcessDMC (IProcess)
MIExecutionGroupDMC __/ |
(IContainer) |
| MIThreadDMC (IThread)
MIExecutionDMC _____/
(IExecution)
Notice how I put MIControlDMContext at the top.
The create*DMC methods have been updated accordingly.
The constructors of the MI*DMC classes have been updated accordingly.
2- Deprecated GDBRunControl.getThreadData() and GDBRunControl.getProcessData()
and have GdbThreadFilterEditor and ThreadVMNode use IProcesses instead.
3- because of (2) I was able to remove IGDBRunControl and GDBRunControlNS
completely.
4- Made MIProcesses.getExecutionData() fetch the thread data using
CLIInfoThreads as is done (but deprecated) in GDBRunControl.getThreadData()
5- Added a cache and event listeners to MIProcesses to cache CLIInfoThreads.
6- Update MIRunControlEventProcessor and CLIEventProcessor to use
MIControlDMContext as their top context instead of IContainerDMContext
This change adds support for multli-process debugging although we are still using the single-process GDB.
With this fix, our debug session will now be in a multi-process situation, with only one process being debugged. At this point, there should be no visible changes in the debugging experience.
Use the generic IDMContext instead of IContainerDMContext because some debuggers may not have a run control service
Replace IThreadDMData.getDebuggingContext() with method getDebuggingContext()
some improvements to the IProcesses interface where needed:
1- getRunningProcesses() should take an IContainerDMContext as a parameter to prepare for multi-core/multi-processor debugging.
2- attachDebuggerToProcess() should return an IContainerDMContext as part of the requestMonitor. This is because, once a process is attached to, it will then need to have a container context to use the RunControl service.
3- getProcessesBeingDebugged() should take an IContainerDMContext as a parameter to prepare for multi-core/multi-processor debugging. Also, it should return an array of IContainerDMContexts as part of the requestMonitor; this is because, processes that are being debugged should have a container context to use the RunControl service.
Using protocol 'mi' will use the latest mi version available to GDB. This is somewhat dangerous, as we actually support mi2. It is safer to specify mi2 as our version.
This patch removes all dependencies to the CDT debug feature.
It copies Extensions that were defined in the CDT to DSF.
I have tested it with an Eclipse that did _not_ have the CDT debug feature, and things seem to work as they should. There was a few files copied from the CDT that may need some cleanup, but I'll leave that for later.
The CDT code we re-use uses the CDT constants that I copied
to DSF, but uses them with a CDT prefix. I had changed that prefix for DSF. I
put the prefix back so that the constants would match.
Update GdbLaunchDelegate to no longer require anything from
org.eclipse.cdt.launch.
Also triggers a build when necessary before launching, as the CDT does.
Also introduces a LaunchMessages class which uses a resourceBundle for
launch messages that has been added as org.eclipse.dd.gdb.internal.provisional.launching.LaunchMessages
Support for Restart button.
The steps to restarting the inferior are the following:
1- Create a new PTY and tell GDB to use it
2- Create a new MIInferiorProcess object which uses the new PTY
2.5- Have the CLIEventProcessor use the new MIInferiorProcess
3- Restart the inferior using -exec-run
4- Remove the previous inferior Process from the launch
5- Add the new inferior Process to the launch (which will trigger the use of
the new PTY streams)
This change supports the Restart function, including the above steps to perform the proper cleanup. The code to start the inferior has been extracted from the FinalLaunchSequence and put in GDBControl to allow sharing between start and restart. Also, the code to create the CLI and inferior process objects has been extracted from the GdbLaunchDelegate and put in GDBControl to to allow sharing between start and restart.
There only interface change that is not in a provisional interface is the
addition of resetInferior() to CLIEventprocessor which is backwards compatible.