Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Torregrosa Paez2016-07-04 09:30:58 -0400
committerPablo Torregrosa Paez2016-07-04 09:30:58 -0400
commit88eef217ef3d627fa6cfbcdfd42e07ca40603c23 (patch)
tree7d8d46d8a63ca81e85da377d16753403c2c7b957 /target_explorer
parente1989aeda2b63c0e54432a1be7a8ad4b4e383241 (diff)
downloadorg.eclipse.tcf-88eef217ef3d627fa6cfbcdfd42e07ca40603c23.tar.gz
org.eclipse.tcf-88eef217ef3d627fa6cfbcdfd42e07ca40603c23.tar.xz
org.eclipse.tcf-88eef217ef3d627fa6cfbcdfd42e07ca40603c23.zip
Target Explorer: Fixed - Launch configuration debugger info cleared
Change-Id: I5f038d4c9c3dcb6b61b8f227c89c697ad1d698b9 Signed-off-by: Pablo Torregrosa Paez <pablo.torregrosa@windriver.com>
Diffstat (limited to 'target_explorer')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEApplicationDebuggerTab.java50
1 files changed, 49 insertions, 1 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEApplicationDebuggerTab.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEApplicationDebuggerTab.java
index 1cc9458eb..6cdd1ad2e 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEApplicationDebuggerTab.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEApplicationDebuggerTab.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012, 2015 Mentor Graphics Corporation and others.
+ * Copyright (c) 2012, 2016 Mentor Graphics Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -13,7 +13,10 @@
package org.eclipse.tcf.te.tcf.launch.cdt.tabs;
+import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
import org.eclipse.cdt.dsf.gdb.service.SessionType;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
public class TEApplicationDebuggerTab extends TEAbstractDebuggerTab {
@@ -26,4 +29,49 @@ public class TEApplicationDebuggerTab extends TEAbstractDebuggerTab {
return "org.eclipse.tcf.te.remotecdt.debug.debuggerTab"; //$NON-NLS-1$
}
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.launch.cdt.tabs.TEAbstractDebuggerTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
+ */
+ @Override
+ public void setDefaults(ILaunchConfigurationWorkingCopy config) {
+ /* If a Launch is initially created as Run and later its LaunchConfiguration is
+ * used as Debug, the class GdbDebuggerPage overwrites some debugger values
+ * which were already set during the "Run Launch Initialization".
+ * These values are backed up here and restored after setting the default ones. */
+ String previousGdbPath = null;
+ Boolean previousDebugOnFork = null;
+ Boolean previousReverse = null;
+ Boolean previousNonStop = null;
+ try {
+ previousGdbPath = config.getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, (String)null);
+ if (config.hasAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_DEBUG_ON_FORK)) {
+ previousDebugOnFork = Boolean.valueOf(config.getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_DEBUG_ON_FORK, false));
+ }
+ if (config.hasAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REVERSE)) {
+ previousReverse = Boolean.valueOf(config.getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REVERSE, false));
+ }
+ if (config.hasAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP)) {
+ previousNonStop = Boolean.valueOf(config.getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, false));
+ }
+ }
+ catch (CoreException e) {
+ }
+
+ // Initialize configuration
+ super.setDefaults(config);
+
+ // Restore values previously set
+ if (previousGdbPath != null) {
+ config.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, previousGdbPath);
+ }
+ if (previousDebugOnFork != null) {
+ config.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_DEBUG_ON_FORK, previousDebugOnFork.booleanValue());
+ }
+ if (previousReverse != null) {
+ config.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REVERSE, previousReverse.booleanValue());
+ }
+ if (previousNonStop != null) {
+ config.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, previousNonStop.booleanValue());
+ }
+ }
}

Back to the top