mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-05 08:05:24 +02:00
Bug 497349 - Reverse debug is always enabled when attaching to a process
Change-Id: I3761e57fb625cab31e013676d3eda7f214496918
This commit is contained in:
parent
db2d46c7fc
commit
efa5f6a75f
1 changed files with 30 additions and 24 deletions
|
@ -56,14 +56,17 @@ public class GDBProcesses_7_10 extends GDBProcesses_7_4 {
|
|||
ILaunch launch = procCtx.getAdapter(ILaunch.class);
|
||||
if (launch != null) {
|
||||
try {
|
||||
boolean reverseEnabled =
|
||||
launch.getLaunchConfiguration().getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REVERSE,
|
||||
IGDBLaunchConfigurationConstants.DEBUGGER_REVERSE_DEFAULT);
|
||||
if (reverseEnabled) {
|
||||
ICommandControlDMContext controlContext = DMContexts.getAncestorOfType(procCtx, ICommandControlDMContext.class);
|
||||
String reverseMode =
|
||||
launch.getLaunchConfiguration().getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REVERSE_MODE,
|
||||
IGDBLaunchConfigurationConstants.DEBUGGER_REVERSE_MODE_DEFAULT);
|
||||
if (reverseMode.equals(IGDBLaunchConfigurationConstants.DEBUGGER_REVERSE_MODE_SOFTWARE)) {
|
||||
reverseService.enableReverseMode(controlContext, ReverseDebugMethod.SOFTWARE, rm);
|
||||
}
|
||||
else if (reverseMode.equals(IGDBLaunchConfigurationConstants.DEBUGGER_REVERSE_MODE_HARDWARE)) {
|
||||
} else if (reverseMode.equals(IGDBLaunchConfigurationConstants.DEBUGGER_REVERSE_MODE_HARDWARE)) {
|
||||
String defaultValue = Platform.getPreferencesService().getString(GdbPlugin.PLUGIN_ID,
|
||||
IGdbDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_HARDWARE,
|
||||
IGdbDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_GDB_TRACE, null);
|
||||
|
@ -80,6 +83,9 @@ public class GDBProcesses_7_10 extends GDBProcesses_7_4 {
|
|||
else {
|
||||
rm.done(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INTERNAL_ERROR, "Unexpected Reverse debugging mode " + reverseMode, null)); //$NON-NLS-1$
|
||||
}
|
||||
} else {
|
||||
rm.done();
|
||||
}
|
||||
} catch (CoreException e) {
|
||||
// Ignore, just don't set reverse method
|
||||
rm.done();
|
||||
|
|
Loading…
Add table
Reference in a new issue