mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-11 02:05:39 +02:00
Bug 485195 - Add gdbserver options in 'Gdbserver Settings' tab
Change-Id: I4e691c16641bb2a620f8146f7371716435783049 Signed-off-by: Adrian Oltean <adrian.oltean@nxp.com>
This commit is contained in:
parent
3763208ee8
commit
afa0449e30
7 changed files with 81 additions and 7 deletions
|
@ -27,6 +27,8 @@ public class Messages extends NLS {
|
||||||
|
|
||||||
public static String Port_number_textfield_label;
|
public static String Port_number_textfield_label;
|
||||||
|
|
||||||
|
public static String Gdbserver_options_textfield_label;
|
||||||
|
|
||||||
public static String Remote_GDB_Debugger_Options;
|
public static String Remote_GDB_Debugger_Options;
|
||||||
|
|
||||||
public static String RemoteCMainTab_Prerun;
|
public static String RemoteCMainTab_Prerun;
|
||||||
|
|
|
@ -47,6 +47,7 @@ RemoteCMainTab_Edit=Edit...
|
||||||
Gdbserver_Settings_Tab_Name=Gdbserver Settings
|
Gdbserver_Settings_Tab_Name=Gdbserver Settings
|
||||||
Gdbserver_name_textfield_label=Gdbserver path:
|
Gdbserver_name_textfield_label=Gdbserver path:
|
||||||
Port_number_textfield_label=Port number:
|
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_Remote_Path_Browse_Button_Title=Select Remote C/C++ Application File
|
||||||
RemoteCMainTab_Properties=Properties...
|
RemoteCMainTab_Properties=Properties...
|
||||||
RemoteCMainTab_Properties_title=Properties
|
RemoteCMainTab_Properties_title=Properties
|
||||||
|
|
|
@ -27,9 +27,12 @@ public interface IRemoteConnectionConfigurationConstants extends
|
||||||
DebugPlugin.getUniqueIdentifier() + ".ATTR_GDBSERVER_PORT"; //$NON-NLS-1$
|
DebugPlugin.getUniqueIdentifier() + ".ATTR_GDBSERVER_PORT"; //$NON-NLS-1$
|
||||||
public static final String ATTR_GDBSERVER_COMMAND =
|
public static final String ATTR_GDBSERVER_COMMAND =
|
||||||
DebugPlugin.getUniqueIdentifier() + ".ATTR_GDBSERVER_COMMAND"; //$NON-NLS-1$
|
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_PORT_DEFAULT = "2345"; //$NON-NLS-1$
|
||||||
public static final String ATTR_GDBSERVER_COMMAND_DEFAULT = "gdbserver"; //$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
|
* Generic Remote Path and Download options
|
||||||
|
|
|
@ -82,7 +82,12 @@ public class RemoteGdbLaunchDelegate extends GdbLaunchDelegate {
|
||||||
.getAttribute(
|
.getAttribute(
|
||||||
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND,
|
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND,
|
||||||
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT);
|
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);
|
+ RSEHelper.spaceEscapify(remoteExePath);
|
||||||
String arguments = getProgramArguments(config);
|
String arguments = getProgramArguments(config);
|
||||||
String prelaunchCmd = config
|
String prelaunchCmd = config
|
||||||
|
|
|
@ -131,7 +131,12 @@ public class RemoteRunLaunchDelegate extends AbstractCLaunchDelegate {
|
||||||
.getAttribute(
|
.getAttribute(
|
||||||
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND,
|
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND,
|
||||||
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT);
|
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);
|
+ RSEHelper.spaceEscapify(remoteExePath);
|
||||||
if (arguments != null && !arguments.equals("")) //$NON-NLS-1$
|
if (arguments != null && !arguments.equals("")) //$NON-NLS-1$
|
||||||
command_arguments += " " + arguments; //$NON-NLS-1$
|
command_arguments += " " + arguments; //$NON-NLS-1$
|
||||||
|
|
|
@ -37,6 +37,8 @@ public class RemoteDSFGDBDebuggerPage extends GdbDebuggerPage{
|
||||||
|
|
||||||
protected Text fGDBServerPortNumberText;
|
protected Text fGDBServerPortNumberText;
|
||||||
|
|
||||||
|
protected Text fGDBServerOptionsText;
|
||||||
|
|
||||||
private boolean fIsInitializing = false;
|
private boolean fIsInitializing = false;
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,6 +59,8 @@ public class RemoteDSFGDBDebuggerPage extends GdbDebuggerPage{
|
||||||
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT );
|
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT );
|
||||||
configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT,
|
configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT,
|
||||||
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT_DEFAULT );
|
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT_DEFAULT );
|
||||||
|
configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS,
|
||||||
|
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS_DEFAULT );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -66,6 +70,7 @@ public class RemoteDSFGDBDebuggerPage extends GdbDebuggerPage{
|
||||||
|
|
||||||
String gdbserverCommand = null;
|
String gdbserverCommand = null;
|
||||||
String gdbserverPortNumber = null;
|
String gdbserverPortNumber = null;
|
||||||
|
String gdbserverOptions = null;
|
||||||
try {
|
try {
|
||||||
gdbserverCommand = configuration.getAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND,
|
gdbserverCommand = configuration.getAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND,
|
||||||
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT);
|
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT);
|
||||||
|
@ -78,8 +83,15 @@ public class RemoteDSFGDBDebuggerPage extends GdbDebuggerPage{
|
||||||
}
|
}
|
||||||
catch( CoreException e ) {
|
catch( CoreException e ) {
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
gdbserverOptions = configuration.getAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS,
|
||||||
|
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS_DEFAULT );
|
||||||
|
}
|
||||||
|
catch( CoreException e ) {
|
||||||
|
}
|
||||||
fGDBServerCommandText.setText( gdbserverCommand );
|
fGDBServerCommandText.setText( gdbserverCommand );
|
||||||
fGDBServerPortNumberText.setText( gdbserverPortNumber );
|
fGDBServerPortNumberText.setText( gdbserverPortNumber );
|
||||||
|
fGDBServerOptionsText.setText( gdbserverOptions );
|
||||||
setInitializing(false);
|
setInitializing(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,6 +104,9 @@ public class RemoteDSFGDBDebuggerPage extends GdbDebuggerPage{
|
||||||
str = fGDBServerPortNumberText.getText();
|
str = fGDBServerPortNumberText.getText();
|
||||||
str.trim();
|
str.trim();
|
||||||
configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT, str );
|
configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT, str );
|
||||||
|
str = fGDBServerOptionsText.getText();
|
||||||
|
str.trim();
|
||||||
|
configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS, str );
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void createGdbserverSettingsTab( TabFolder tabFolder ) {
|
protected void createGdbserverSettingsTab( TabFolder tabFolder ) {
|
||||||
|
@ -118,7 +133,7 @@ public class RemoteDSFGDBDebuggerPage extends GdbDebuggerPage{
|
||||||
|
|
||||||
|
|
||||||
fGDBServerCommandText = new Text(subComp, SWT.SINGLE | SWT.BORDER);
|
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.setLayoutData(data);
|
||||||
fGDBServerCommandText.addModifyListener( new ModifyListener() {
|
fGDBServerCommandText.addModifyListener( new ModifyListener() {
|
||||||
|
|
||||||
|
@ -132,10 +147,24 @@ public class RemoteDSFGDBDebuggerPage extends GdbDebuggerPage{
|
||||||
label.setLayoutData( gd );
|
label.setLayoutData( gd );
|
||||||
|
|
||||||
fGDBServerPortNumberText = new Text(subComp, SWT.SINGLE | SWT.BORDER);
|
fGDBServerPortNumberText = new Text(subComp, SWT.SINGLE | SWT.BORDER);
|
||||||
data = new GridData();
|
data = new GridData(SWT.FILL, SWT.TOP, true, false);
|
||||||
fGDBServerPortNumberText.setLayoutData(data);
|
fGDBServerPortNumberText.setLayoutData(data);
|
||||||
fGDBServerPortNumberText.addModifyListener( new ModifyListener() {
|
fGDBServerPortNumberText.addModifyListener( new ModifyListener() {
|
||||||
|
|
||||||
|
public void modifyText( ModifyEvent evt ) {
|
||||||
|
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 ) {
|
public void modifyText( ModifyEvent evt ) {
|
||||||
updateLaunchConfigurationDialog();
|
updateLaunchConfigurationDialog();
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,8 @@ public class RemoteGDBDebuggerPage extends GDBDebuggerPage {
|
||||||
|
|
||||||
protected Text fGDBServerPortNumberText;
|
protected Text fGDBServerPortNumberText;
|
||||||
|
|
||||||
|
protected Text fGDBServerOptionsText;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return Messages.Remote_GDB_Debugger_Options;
|
return Messages.Remote_GDB_Debugger_Options;
|
||||||
|
@ -55,6 +57,8 @@ public class RemoteGDBDebuggerPage extends GDBDebuggerPage {
|
||||||
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT );
|
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT );
|
||||||
configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT,
|
configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT,
|
||||||
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT_DEFAULT );
|
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT_DEFAULT );
|
||||||
|
configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS,
|
||||||
|
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS_DEFAULT );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -62,6 +66,7 @@ public class RemoteGDBDebuggerPage extends GDBDebuggerPage {
|
||||||
super.initializeFrom(configuration);
|
super.initializeFrom(configuration);
|
||||||
String gdbserverCommand = null;
|
String gdbserverCommand = null;
|
||||||
String gdbserverPortNumber = null;
|
String gdbserverPortNumber = null;
|
||||||
|
String gdbserverOptions = null;
|
||||||
try {
|
try {
|
||||||
gdbserverCommand = configuration.getAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND,
|
gdbserverCommand = configuration.getAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND,
|
||||||
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT);
|
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT);
|
||||||
|
@ -74,8 +79,15 @@ public class RemoteGDBDebuggerPage extends GDBDebuggerPage {
|
||||||
}
|
}
|
||||||
catch( CoreException e ) {
|
catch( CoreException e ) {
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
gdbserverOptions = configuration.getAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS,
|
||||||
|
IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS_DEFAULT );
|
||||||
|
}
|
||||||
|
catch( CoreException e ) {
|
||||||
|
}
|
||||||
fGDBServerCommandText.setText( gdbserverCommand );
|
fGDBServerCommandText.setText( gdbserverCommand );
|
||||||
fGDBServerPortNumberText.setText( gdbserverPortNumber );
|
fGDBServerPortNumberText.setText( gdbserverPortNumber );
|
||||||
|
fGDBServerOptionsText.setText( gdbserverOptions );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -87,6 +99,9 @@ public class RemoteGDBDebuggerPage extends GDBDebuggerPage {
|
||||||
str = fGDBServerPortNumberText.getText();
|
str = fGDBServerPortNumberText.getText();
|
||||||
str.trim();
|
str.trim();
|
||||||
configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT, str );
|
configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT, str );
|
||||||
|
str = fGDBServerOptionsText.getText();
|
||||||
|
str.trim();
|
||||||
|
configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_OPTIONS, str );
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void createGdbserverSettingsTab( TabFolder tabFolder ) {
|
protected void createGdbserverSettingsTab( TabFolder tabFolder ) {
|
||||||
|
@ -113,7 +128,7 @@ public class RemoteGDBDebuggerPage extends GDBDebuggerPage {
|
||||||
|
|
||||||
|
|
||||||
fGDBServerCommandText = new Text(subComp, SWT.SINGLE | SWT.BORDER);
|
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.setLayoutData(data);
|
||||||
fGDBServerCommandText.addModifyListener( new ModifyListener() {
|
fGDBServerCommandText.addModifyListener( new ModifyListener() {
|
||||||
|
|
||||||
|
@ -127,10 +142,24 @@ public class RemoteGDBDebuggerPage extends GDBDebuggerPage {
|
||||||
label.setLayoutData( gd );
|
label.setLayoutData( gd );
|
||||||
|
|
||||||
fGDBServerPortNumberText = new Text(subComp, SWT.SINGLE | SWT.BORDER);
|
fGDBServerPortNumberText = new Text(subComp, SWT.SINGLE | SWT.BORDER);
|
||||||
data = new GridData();
|
data = new GridData(SWT.FILL, SWT.TOP, true, false);
|
||||||
fGDBServerPortNumberText.setLayoutData(data);
|
fGDBServerPortNumberText.setLayoutData(data);
|
||||||
fGDBServerPortNumberText.addModifyListener( new ModifyListener() {
|
fGDBServerPortNumberText.addModifyListener( new ModifyListener() {
|
||||||
|
|
||||||
|
public void modifyText( ModifyEvent evt ) {
|
||||||
|
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 ) {
|
public void modifyText( ModifyEvent evt ) {
|
||||||
updateLaunchConfigurationDialog();
|
updateLaunchConfigurationDialog();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue