Skip to main content
summaryrefslogtreecommitdiffstats
path: root/cross
diff options
context:
space:
mode:
authorAdrian Oltean2016-01-05 09:11:47 -0500
committerAdrian Oltean2016-01-06 03:33:35 -0500
commitafa0449e302c14f21f0af9c5ca289f71fa963c68 (patch)
tree4258a90be616faacc30b3770ad0672291ac7055d /cross
parent3763208ee8ee38fa6aa89feb60a08be0331de85f (diff)
downloadorg.eclipse.cdt-afa0449e302c14f21f0af9c5ca289f71fa963c68.tar.gz
org.eclipse.cdt-afa0449e302c14f21f0af9c5ca289f71fa963c68.tar.xz
org.eclipse.cdt-afa0449e302c14f21f0af9c5ca289f71fa963c68.zip
Bug 485195 - Add gdbserver options in 'Gdbserver Settings' tab
Change-Id: I4e691c16641bb2a620f8146f7371716435783049 Signed-off-by: Adrian Oltean <adrian.oltean@nxp.com>
Diffstat (limited to 'cross')
-rw-r--r--cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/Messages.java2
-rw-r--r--cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/messages.properties1
-rw-r--r--cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/IRemoteConnectionConfigurationConstants.java3
-rw-r--r--cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteGdbLaunchDelegate.java7
-rw-r--r--cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteRunLaunchDelegate.java7
-rw-r--r--cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteDSFGDBDebuggerPage.java35
-rw-r--r--cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteGDBDebuggerPage.java33
7 files changed, 81 insertions, 7 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 6445893d14..b801ad8fa9 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
@@ -27,6 +27,8 @@ public class Messages extends NLS {
public static String Port_number_textfield_label;
+ public static String Gdbserver_options_textfield_label;
+
public static String Remote_GDB_Debugger_Options;
public static String RemoteCMainTab_Prerun;
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 9ddb5594d5..b61a5888f9 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
@@ -47,6 +47,7 @@ RemoteCMainTab_Edit=Edit...
Gdbserver_Settings_Tab_Name=Gdbserver Settings
Gdbserver_name_textfield_label=Gdbserver path:
Port_number_textfield_label=Port number:
+Gdbserver_options_textfield_label=Gdbserver options:
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/IRemoteConnectionConfigurationConstants.java b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/IRemoteConnectionConfigurationConstants.java
index e86581f185..b0912ba52b 100644
--- a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/IRemoteConnectionConfigurationConstants.java
+++ b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/IRemoteConnectionConfigurationConstants.java
@@ -27,9 +27,12 @@ public interface IRemoteConnectionConfigurationConstants extends
DebugPlugin.getUniqueIdentifier() + ".ATTR_GDBSERVER_PORT"; //$NON-NLS-1$
public static final String ATTR_GDBSERVER_COMMAND =
DebugPlugin.getUniqueIdentifier() + ".ATTR_GDBSERVER_COMMAND"; //$NON-NLS-1$
+ public static final String ATTR_GDBSERVER_OPTIONS =
+ DebugPlugin.getUniqueIdentifier() + ".ATTR_GDBSERVER_OPTIONS"; //$NON-NLS-1$
public static final String ATTR_GDBSERVER_PORT_DEFAULT = "2345"; //$NON-NLS-1$
public static final String ATTR_GDBSERVER_COMMAND_DEFAULT = "gdbserver"; //$NON-NLS-1$
+ public static final String ATTR_GDBSERVER_OPTIONS_DEFAULT = ""; //$NON-NLS-1$
/*
* Generic Remote Path and Download options
diff --git a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteGdbLaunchDelegate.java b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteGdbLaunchDelegate.java
index a71d957fb2..b12f4fd6d8 100644
--- a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteGdbLaunchDelegate.java
+++ b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteGdbLaunchDelegate.java
@@ -82,7 +82,12 @@ public class RemoteGdbLaunchDelegate extends GdbLaunchDelegate {
.getAttribute(
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND,
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT);
- String commandArguments = ":" + gdbserverPortNumber + " " //$NON-NLS-1$ //$NON-NLS-2$
+ String gdbserverOptions = config
+ .getAttribute(
+ IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS,
+ IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS_DEFAULT);
+ String commandArguments = gdbserverOptions + " " //$NON-NLS-1$
+ + ":" + gdbserverPortNumber + " " //$NON-NLS-1$ //$NON-NLS-2$
+ RSEHelper.spaceEscapify(remoteExePath);
String arguments = getProgramArguments(config);
String prelaunchCmd = config
diff --git a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteRunLaunchDelegate.java b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteRunLaunchDelegate.java
index e0b26e7c92..4f0ced355a 100644
--- a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteRunLaunchDelegate.java
+++ b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteRunLaunchDelegate.java
@@ -131,7 +131,12 @@ public class RemoteRunLaunchDelegate extends AbstractCLaunchDelegate {
.getAttribute(
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND,
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT);
- String command_arguments = ":" + gdbserver_port_number + " " //$NON-NLS-1$ //$NON-NLS-2$
+ String gdbserver_options = config
+ .getAttribute(
+ IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS,
+ IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS_DEFAULT);
+ String command_arguments = gdbserver_options + " " //$NON-NLS-1$
+ + ":" + gdbserver_port_number + " " //$NON-NLS-1$ //$NON-NLS-2$
+ RSEHelper.spaceEscapify(remoteExePath);
if (arguments != null && !arguments.equals("")) //$NON-NLS-1$
command_arguments += " " + arguments; //$NON-NLS-1$
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 7aae27bcd4..125a4fa199 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
@@ -36,7 +36,9 @@ public class RemoteDSFGDBDebuggerPage extends GdbDebuggerPage{
protected Text fGDBServerCommandText;
protected Text fGDBServerPortNumberText;
-
+
+ protected Text fGDBServerOptionsText;
+
private boolean fIsInitializing = false;
@@ -57,6 +59,8 @@ public class RemoteDSFGDBDebuggerPage extends GdbDebuggerPage{
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT );
configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT,
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT_DEFAULT );
+ configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS,
+ IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS_DEFAULT );
}
@Override
@@ -66,6 +70,7 @@ public class RemoteDSFGDBDebuggerPage extends GdbDebuggerPage{
String gdbserverCommand = null;
String gdbserverPortNumber = null;
+ String gdbserverOptions = null;
try {
gdbserverCommand = configuration.getAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND,
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT);
@@ -78,8 +83,15 @@ public class RemoteDSFGDBDebuggerPage extends GdbDebuggerPage{
}
catch( CoreException e ) {
}
+ try {
+ gdbserverOptions = configuration.getAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS,
+ IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS_DEFAULT );
+ }
+ catch( CoreException e ) {
+ }
fGDBServerCommandText.setText( gdbserverCommand );
fGDBServerPortNumberText.setText( gdbserverPortNumber );
+ fGDBServerOptionsText.setText( gdbserverOptions );
setInitializing(false);
}
@@ -92,6 +104,9 @@ public class RemoteDSFGDBDebuggerPage extends GdbDebuggerPage{
str = fGDBServerPortNumberText.getText();
str.trim();
configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT, str );
+ str = fGDBServerOptionsText.getText();
+ str.trim();
+ configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS, str );
}
protected void createGdbserverSettingsTab( TabFolder tabFolder ) {
@@ -118,7 +133,7 @@ public class RemoteDSFGDBDebuggerPage extends GdbDebuggerPage{
fGDBServerCommandText = new Text(subComp, SWT.SINGLE | SWT.BORDER);
- GridData data = new GridData();
+ GridData data = new GridData(SWT.FILL, SWT.TOP, true, false);
fGDBServerCommandText.setLayoutData(data);
fGDBServerCommandText.addModifyListener( new ModifyListener() {
@@ -132,7 +147,7 @@ public class RemoteDSFGDBDebuggerPage extends GdbDebuggerPage{
label.setLayoutData( gd );
fGDBServerPortNumberText = new Text(subComp, SWT.SINGLE | SWT.BORDER);
- data = new GridData();
+ data = new GridData(SWT.FILL, SWT.TOP, true, false);
fGDBServerPortNumberText.setLayoutData(data);
fGDBServerPortNumberText.addModifyListener( new ModifyListener() {
@@ -140,6 +155,20 @@ public class RemoteDSFGDBDebuggerPage extends GdbDebuggerPage{
updateLaunchConfigurationDialog();
}
} );
+ label = new Label(subComp, SWT.LEFT);
+ label.setText(Messages.Gdbserver_options_textfield_label);
+ gd = new GridData();
+ label.setLayoutData( gd );
+
+ fGDBServerOptionsText = new Text(subComp, SWT.SINGLE | SWT.BORDER);
+ data = new GridData(SWT.FILL, SWT.TOP, true, false);
+ fGDBServerOptionsText.setLayoutData(data);
+ fGDBServerOptionsText.addModifyListener( new ModifyListener() {
+
+ public void modifyText( ModifyEvent evt ) {
+ updateLaunchConfigurationDialog();
+ }
+ } );
}
/* (non-Javadoc)
diff --git a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteGDBDebuggerPage.java b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteGDBDebuggerPage.java
index 85507b97b4..1db2eec48b 100644
--- a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteGDBDebuggerPage.java
+++ b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteGDBDebuggerPage.java
@@ -42,6 +42,8 @@ public class RemoteGDBDebuggerPage extends GDBDebuggerPage {
protected Text fGDBServerCommandText;
protected Text fGDBServerPortNumberText;
+
+ protected Text fGDBServerOptionsText;
@Override
public String getName() {
@@ -55,6 +57,8 @@ public class RemoteGDBDebuggerPage extends GDBDebuggerPage {
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT );
configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT,
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT_DEFAULT );
+ configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS,
+ IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS_DEFAULT );
}
@Override
@@ -62,6 +66,7 @@ public class RemoteGDBDebuggerPage extends GDBDebuggerPage {
super.initializeFrom(configuration);
String gdbserverCommand = null;
String gdbserverPortNumber = null;
+ String gdbserverOptions = null;
try {
gdbserverCommand = configuration.getAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND,
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT);
@@ -74,8 +79,15 @@ public class RemoteGDBDebuggerPage extends GDBDebuggerPage {
}
catch( CoreException e ) {
}
+ try {
+ gdbserverOptions = configuration.getAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS,
+ IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS_DEFAULT );
+ }
+ catch( CoreException e ) {
+ }
fGDBServerCommandText.setText( gdbserverCommand );
fGDBServerPortNumberText.setText( gdbserverPortNumber );
+ fGDBServerOptionsText.setText( gdbserverOptions );
}
@Override
@@ -87,6 +99,9 @@ public class RemoteGDBDebuggerPage extends GDBDebuggerPage {
str = fGDBServerPortNumberText.getText();
str.trim();
configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT, str );
+ str = fGDBServerOptionsText.getText();
+ str.trim();
+ configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS, str );
}
protected void createGdbserverSettingsTab( TabFolder tabFolder ) {
@@ -113,7 +128,7 @@ public class RemoteGDBDebuggerPage extends GDBDebuggerPage {
fGDBServerCommandText = new Text(subComp, SWT.SINGLE | SWT.BORDER);
- GridData data = new GridData();
+ GridData data = new GridData(SWT.FILL, SWT.TOP, true, false);
fGDBServerCommandText.setLayoutData(data);
fGDBServerCommandText.addModifyListener( new ModifyListener() {
@@ -127,7 +142,7 @@ public class RemoteGDBDebuggerPage extends GDBDebuggerPage {
label.setLayoutData( gd );
fGDBServerPortNumberText = new Text(subComp, SWT.SINGLE | SWT.BORDER);
- data = new GridData();
+ data = new GridData(SWT.FILL, SWT.TOP, true, false);
fGDBServerPortNumberText.setLayoutData(data);
fGDBServerPortNumberText.addModifyListener( new ModifyListener() {
@@ -135,6 +150,20 @@ public class RemoteGDBDebuggerPage extends GDBDebuggerPage {
updateLaunchConfigurationDialog();
}
} );
+ label = new Label(subComp, SWT.LEFT);
+ label.setText(Messages.Gdbserver_options_textfield_label);
+ gd = new GridData();
+ label.setLayoutData( gd );
+
+ fGDBServerOptionsText = new Text(subComp, SWT.SINGLE | SWT.BORDER);
+ data = new GridData(SWT.FILL, SWT.TOP, true, false);
+ fGDBServerOptionsText.setLayoutData(data);
+ fGDBServerOptionsText.addModifyListener( new ModifyListener() {
+
+ public void modifyText( ModifyEvent evt ) {
+ updateLaunchConfigurationDialog();
+ }
+ } );
}
/* (non-Javadoc)

Back to the top