1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-25 09:55:29 +02:00

Bug 525692: Execute run commands before resume

The -exec-continue command must be last in the GDB
Hardware Debugging launch sequence to ensure any run
commands are executed before application code.

Change-Id: I1eae32698e80d1c1b36da4bbdf21d85d363bcd05
Signed-off-by: John Dallaway <john@dallaway.org.uk>
This commit is contained in:
John Dallaway 2017-10-08 12:37:08 +01:00
parent 11dcec43f2
commit 78380bf5f7
2 changed files with 23 additions and 24 deletions

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2007, 2016 QNX Software Systems and others.
* Copyright (c) 2007, 2017 QNX Software Systems 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
@ -15,6 +15,7 @@
* Marc Khouzam (Ericsson) - Updated to extend FinalLaunchSequence instead of copying it (bug 324101)
* William Riley (Renesas) - Memory viewing broken (Bug 413483)
* Marc Khouzam (Ericsson) - Cannot disable Delay command (bug 413437)
* John Dallaway - Execute run commands before resume (Bug 525692)
*******************************************************************************/
package org.eclipse.cdt.debug.gdbjtag.core;
@ -174,8 +175,8 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
"stepSetProgramCounter", //$NON-NLS-1$
"stepStopScript", //$NON-NLS-1$
"stepResumeScript", //$NON-NLS-1$
"stepUserDebugCommands", //$NON-NLS-1$
"stepResumeScript", //$NON-NLS-1$
"stepJTAGCleanup", //$NON-NLS-1$
};
}

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2007 - 2015 QNX Software Systems and others.
* Copyright (c) 2007 - 2017 QNX Software Systems 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
@ -9,6 +9,7 @@
* QNX Software Systems - Initial API and implementation
* Andy Jin - Hardware debugging UI improvements, bug 229946
* Andy Jin - Added DSF debugging, bug 248593
* John Dallaway - Execute run commands before resume, bug 525692
*******************************************************************************/
package org.eclipse.cdt.debug.gdbjtag.ui;
@ -430,7 +431,12 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
symbolsFileBrowse.setEnabled(enabled);
}
/** Implementation migrated to {@link #createRunGroup(Composite)} */
@Deprecated
public void createRunOptionGroup(Composite parent) {
}
public void createRunGroup(Composite parent) {
Group group = new Group(parent, SWT.NONE);
GridLayout layout = new GridLayout();
group.setLayout(layout);
@ -438,7 +444,7 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 1;
group.setLayoutData(gd);
group.setText(Messages.getString("GDBJtagStartupTab.runOptionGroup_Text"));
group.setText(Messages.getString("GDBJtagStartupTab.runGroup_Text"));
setPcRegister = new Button(group, SWT.CHECK);
setPcRegister.setText(Messages.getString("GDBJtagStartupTab.setPcRegister_Text"));
@ -496,6 +502,18 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
}
});
runCommands = new Text(group, SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL);
gd = new GridData(GridData.FILL_BOTH);
gd.horizontalSpan = 2;
gd.heightHint = 60;
runCommands.setLayoutData(gd);
runCommands.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent evt) {
scheduleUpdateJob();
}
});
setResume = new Button(group, SWT.CHECK);
setResume.setText(Messages.getString("GDBJtagStartupTab.setResume_Text"));
gd = new GridData();
@ -544,26 +562,6 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
resume = setResume.getSelection();
}
public void createRunGroup(Composite parent) {
Group group = new Group(parent, SWT.NONE);
GridLayout layout = new GridLayout();
group.setLayout(layout);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
group.setLayoutData(gd);
group.setText(Messages.getString("GDBJtagStartupTab.runGroup_Text"));
runCommands = new Text(group, SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL);
gd = new GridData(GridData.FILL_BOTH);
gd.heightHint = 60;
runCommands.setLayoutData(gd);
runCommands.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent evt) {
scheduleUpdateJob();
}
});
}
/* (non-Javadoc)
* @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#isValid(org.eclipse.debug.core.ILaunchConfiguration)
*/