Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Khouzam2011-04-20 18:10:37 +0000
committerMarc Khouzam2011-04-20 18:10:37 +0000
commitcfd1f8213c3ea8fd699a5b24fa2051a19a628a53 (patch)
tree2d8ba9c91f4cb6a5adb94261412ba07b01d30b53 /dsf-gdb/org.eclipse.cdt.dsf.gdb.ui
parent096a053e124e1b4d480e33d5f792aea56c9eeb20 (diff)
downloadorg.eclipse.cdt-cfd1f8213c3ea8fd699a5b24fa2051a19a628a53.tar.gz
org.eclipse.cdt-cfd1f8213c3ea8fd699a5b24fa2051a19a628a53.tar.xz
org.eclipse.cdt-cfd1f8213c3ea8fd699a5b24fa2051a19a628a53.zip
Bug 340697: Auto attach to processes forked by the process being debugged
Diffstat (limited to 'dsf-gdb/org.eclipse.cdt.dsf.gdb.ui')
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbDebuggerPage.java13
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/LaunchUIMessages.properties1
2 files changed, 12 insertions, 2 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbDebuggerPage.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbDebuggerPage.java
index e3c8322279b..4f3f0efeb09 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbDebuggerPage.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbDebuggerPage.java
@@ -52,6 +52,7 @@ public class GdbDebuggerPage extends AbstractCDebuggerPage implements Observer {
protected Button fNonStopCheckBox;
protected Button fReverseCheckBox;
protected Button fUpdateThreadlistOnSuspend;
+ protected Button fDebugOnFork;
private IMILaunchConfigurationComponent fSolibBlock;
private boolean fIsInitializing = false;
@@ -79,6 +80,8 @@ public class GdbDebuggerPage extends AbstractCDebuggerPage implements Observer {
IGDBLaunchConfigurationConstants.DEBUGGER_REVERSE_DEFAULT);
configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_UPDATE_THREADLIST_ON_SUSPEND,
IGDBLaunchConfigurationConstants.DEBUGGER_UPDATE_THREADLIST_ON_SUSPEND_DEFAULT);
+ configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_DEBUG_ON_FORK,
+ IGDBLaunchConfigurationConstants.DEBUGGER_DEBUG_ON_FORK_DEFAULT);
if (fSolibBlock != null)
fSolibBlock.setDefaults(configuration);
@@ -130,6 +133,8 @@ public class GdbDebuggerPage extends AbstractCDebuggerPage implements Observer {
IGDBLaunchConfigurationConstants.DEBUGGER_REVERSE_DEFAULT);
boolean updateThreadsOnSuspend = getBooleanAttr(configuration, IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_UPDATE_THREADLIST_ON_SUSPEND,
IGDBLaunchConfigurationConstants.DEBUGGER_UPDATE_THREADLIST_ON_SUSPEND_DEFAULT);
+ boolean debugOnFork = getBooleanAttr(configuration, IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_DEBUG_ON_FORK,
+ IGDBLaunchConfigurationConstants.DEBUGGER_DEBUG_ON_FORK_DEFAULT);
if (fSolibBlock != null)
fSolibBlock.initializeFrom(configuration);
@@ -138,6 +143,7 @@ public class GdbDebuggerPage extends AbstractCDebuggerPage implements Observer {
fNonStopCheckBox.setSelection(nonStopMode);
fReverseCheckBox.setSelection(reverseEnabled);
fUpdateThreadlistOnSuspend.setSelection(updateThreadsOnSuspend);
+ fDebugOnFork.setSelection(debugOnFork);
setInitializing(false);
}
@@ -152,8 +158,9 @@ public class GdbDebuggerPage extends AbstractCDebuggerPage implements Observer {
configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REVERSE,
fReverseCheckBox.getSelection());
configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_UPDATE_THREADLIST_ON_SUSPEND,
- fUpdateThreadlistOnSuspend.getSelection());
-
+ fUpdateThreadlistOnSuspend.getSelection());
+ configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_DEBUG_ON_FORK,
+ fDebugOnFork.getSelection());
if (fSolibBlock != null)
fSolibBlock.performApply(configuration);
}
@@ -303,6 +310,8 @@ public class GdbDebuggerPage extends AbstractCDebuggerPage implements Observer {
fUpdateThreadlistOnSuspend = addCheckbox(subComp, LaunchUIMessages.getString("GDBDebuggerPage.update_thread_list_on_suspend")); //$NON-NLS-1$
// This checkbox needs an explanation. Attach context help to it.
PlatformUI.getWorkbench().getHelpSystem().setHelp(fUpdateThreadlistOnSuspend, GdbUIPlugin.PLUGIN_ID + ".update_threadlist_button_context"); //$NON-NLS-1$
+
+ fDebugOnFork = addCheckbox(subComp, LaunchUIMessages.getString("GDBDebuggerPage.Automatically_debug_forked_processes")); //$NON-NLS-1$
}
public void createSolibTab(TabFolder tabFolder) {
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/LaunchUIMessages.properties b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/LaunchUIMessages.properties
index 01ff2183232..5262c153f75 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/LaunchUIMessages.properties
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/LaunchUIMessages.properties
@@ -24,6 +24,7 @@ GDBDebuggerPage.shared_libraries=Shared Libraries
GDBDebuggerPage.nonstop_mode=Non-stop mode (Note: Requires non-stop GDB)
GDBDebuggerPage.reverse_Debugging=Enable Reverse Debugging at startup (Note: Requires Reverse GDB)
GDBDebuggerPage.update_thread_list_on_suspend=Force thread list update on suspend
+GDBDebuggerPage.Automatically_debug_forked_processes=Automatically debug forked processes (Note: Requires Multi Process GDB)
StandardGDBDebuggerPage.0=Debugger executable must be specified.
StandardGDBDebuggerPage.1=GDB Debugger Options
StandardGDBDebuggerPage.2=Main

Back to the top