mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-10 01:35: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 Gdbserver_options_textfield_label;
|
||||
|
||||
public static String Remote_GDB_Debugger_Options;
|
||||
|
||||
public static String RemoteCMainTab_Prerun;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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$
|
||||
|
|
|
@ -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,10 +147,24 @@ 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() {
|
||||
|
||||
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 ) {
|
||||
updateLaunchConfigurationDialog();
|
||||
}
|
||||
|
|
|
@ -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,10 +142,24 @@ 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() {
|
||||
|
||||
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 ) {
|
||||
updateLaunchConfigurationDialog();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue