Skip to main content
summaryrefslogtreecommitdiffstats
path: root/cross
diff options
context:
space:
mode:
authorJonah Graham2018-02-01 14:12:10 -0500
committerJonah Graham2018-02-06 09:08:39 -0500
commit65157ef4d52e91e31d3eac0369a39511a131ec3c (patch)
treee034b54c2ee9330d43eb7eae56779e7f0e7065e2 /cross
parent345f37874c118a78b3df00cf4d9a18f9875b56ab (diff)
downloadorg.eclipse.cdt-65157ef4d52e91e31d3eac0369a39511a131ec3c.tar.gz
org.eclipse.cdt-65157ef4d52e91e31d3eac0369a39511a131ec3c.tar.xz
org.eclipse.cdt-65157ef4d52e91e31d3eac0369a39511a131ec3c.zip
Bug 530635: Add ability to do "set remotetimeout" via UI
Diffstat (limited to 'cross')
-rw-r--r--cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/Messages.java6
-rw-r--r--cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/messages.properties4
-rw-r--r--cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteDSFGDBDebuggerPage.java66
3 files changed, 73 insertions, 3 deletions
diff --git a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/Messages.java b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/Messages.java
index 4ae9671d42..8eb0f0c582 100644
--- a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/Messages.java
+++ b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/Messages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2016 Wind River Systems, Inc. and others.
+ * Copyright (c) 2006, 2018 Wind River Systems, Inc. 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
@@ -75,6 +75,10 @@ public class Messages extends NLS {
public static String RemoteRunLaunchDelegate_9;
+ public static String Remotetimeout_label;
+
+ public static String Remotetimeout_tooltip;
+
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/messages.properties b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/messages.properties
index ef99467f80..afeabb7c54 100644
--- a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/messages.properties
+++ b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/messages.properties
@@ -1,5 +1,5 @@
################################################################################
-# Copyright (c) 2006, 2012 Wind River Systems, Inc. and others.
+# Copyright (c) 2006, 2018 Wind River Systems, Inc. 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
@@ -51,6 +51,8 @@ Gdbserver_Settings_Tab_Name=Gdbserver Settings
Gdbserver_name_textfield_label=Gdbserver path:
Port_number_textfield_label=Port number:
Gdbserver_options_textfield_label=Gdbserver options:
+Remotetimeout_label=Remote timeout (seconds):
+Remotetimeout_tooltip=Timeout for the remote target to respond. If unchecked, uses GDB default value. See GDB's help for "set remotetimeout num".
RemoteCMainTab_Remote_Path_Browse_Button_Title=Select Remote C/C++ Application File
RemoteCMainTab_Properties=Properties...
RemoteCMainTab_Properties_title=Properties
diff --git a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteDSFGDBDebuggerPage.java b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteDSFGDBDebuggerPage.java
index 1ef41c059f..e94605d8af 100644
--- a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteDSFGDBDebuggerPage.java
+++ b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteDSFGDBDebuggerPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2016 PalmSource, Inc. and others.
+ * Copyright (c) 2006, 2018 PalmSource, Inc. 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
@@ -14,7 +14,9 @@
*******************************************************************************/
package org.eclipse.cdt.launch.remote.tabs;
+import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
import org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbDebuggerPage;
+import org.eclipse.cdt.dsf.gdb.launching.LaunchUtils;
import org.eclipse.cdt.internal.launch.remote.Messages;
import org.eclipse.cdt.launch.remote.IRemoteConnectionConfigurationConstants;
import org.eclipse.core.runtime.CoreException;
@@ -23,8 +25,11 @@ import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.TabFolder;
@@ -38,6 +43,10 @@ public class RemoteDSFGDBDebuggerPage extends GdbDebuggerPage{
protected Text fGDBServerPortNumberText;
protected Text fGDBServerOptionsText;
+
+ protected Button fRemoteTimeoutEnabledCheckbox;
+
+ protected Text fRemoteTimeoutValueText;
private boolean fIsInitializing = false;
@@ -61,6 +70,10 @@ public class RemoteDSFGDBDebuggerPage extends GdbDebuggerPage{
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT_DEFAULT );
configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS,
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS_DEFAULT );
+ configuration.setAttribute( IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REMOTE_TIMEOUT_ENABLED,
+ LaunchUtils.getRemoteTimeoutEnabledDefault());
+ configuration.setAttribute( IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REMOTE_TIMEOUT_VALUE,
+ LaunchUtils.getRemoteTimeoutValueDefault());
}
@Override
@@ -71,6 +84,8 @@ public class RemoteDSFGDBDebuggerPage extends GdbDebuggerPage{
String gdbserverCommand = null;
String gdbserverPortNumber = null;
String gdbserverOptions = null;
+ boolean remoteTimeoutEnabled = false;
+ String remoteTimeoutValue = null;
try {
gdbserverCommand = configuration.getAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND,
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT);
@@ -89,9 +104,24 @@ public class RemoteDSFGDBDebuggerPage extends GdbDebuggerPage{
}
catch( CoreException e ) {
}
+ try {
+ remoteTimeoutEnabled = configuration.getAttribute( IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REMOTE_TIMEOUT_ENABLED,
+ LaunchUtils.getRemoteTimeoutEnabledDefault() );
+ }
+ catch( CoreException e ) {
+ }
+ try {
+ remoteTimeoutValue = configuration.getAttribute( IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REMOTE_TIMEOUT_VALUE,
+ LaunchUtils.getRemoteTimeoutValueDefault() );
+ }
+ catch( CoreException e ) {
+ }
fGDBServerCommandText.setText( gdbserverCommand );
fGDBServerPortNumberText.setText( gdbserverPortNumber );
fGDBServerOptionsText.setText( gdbserverOptions );
+ fRemoteTimeoutEnabledCheckbox.setSelection( remoteTimeoutEnabled );
+ fRemoteTimeoutValueText.setText( remoteTimeoutValue );
+ remoteTimeoutEnabledChanged();
setInitializing(false);
}
@@ -107,6 +137,11 @@ public class RemoteDSFGDBDebuggerPage extends GdbDebuggerPage{
str = fGDBServerOptionsText.getText();
str.trim();
configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS, str );
+ boolean b = fRemoteTimeoutEnabledCheckbox.getSelection();
+ configuration.setAttribute( IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REMOTE_TIMEOUT_ENABLED, b );
+ str = fRemoteTimeoutValueText.getText();
+ str.trim();
+ configuration.setAttribute( IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REMOTE_TIMEOUT_VALUE, str );
}
protected void createGdbserverSettingsTab( TabFolder tabFolder ) {
@@ -169,6 +204,35 @@ public class RemoteDSFGDBDebuggerPage extends GdbDebuggerPage{
updateLaunchConfigurationDialog();
}
} );
+
+ fRemoteTimeoutEnabledCheckbox = new Button(subComp, SWT.CHECK);
+ fRemoteTimeoutEnabledCheckbox.setText(Messages.Remotetimeout_label);
+ fRemoteTimeoutEnabledCheckbox.setToolTipText(Messages.Remotetimeout_tooltip);
+ gd = new GridData();
+ fRemoteTimeoutEnabledCheckbox.setLayoutData( gd );
+ fRemoteTimeoutEnabledCheckbox.addSelectionListener( new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ remoteTimeoutEnabledChanged();
+ updateLaunchConfigurationDialog();
+ }
+ } );
+
+ fRemoteTimeoutValueText = new Text(subComp, SWT.SINGLE | SWT.BORDER);
+ data = new GridData(SWT.FILL, SWT.TOP, true, false);
+ fRemoteTimeoutValueText.setLayoutData(data);
+ fRemoteTimeoutValueText.setToolTipText(Messages.Remotetimeout_tooltip);
+ fRemoteTimeoutValueText.addModifyListener( new ModifyListener() {
+
+ public void modifyText( ModifyEvent evt ) {
+ updateLaunchConfigurationDialog();
+ }
+ } );
+ remoteTimeoutEnabledChanged();
+ }
+
+ private void remoteTimeoutEnabledChanged() {
+ fRemoteTimeoutValueText.setEnabled(fRemoteTimeoutEnabledCheckbox.getSelection());
}
/* (non-Javadoc)

Back to the top