1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 576811: Provide default launch delay implementation

Change-Id: Ieedd3f935b9b396c5c9022aed0a161477df285fd
Signed-off-by: John Dallaway <john@dallaway.org.uk>
This commit is contained in:
John Dallaway 2021-10-21 15:11:52 +01:00
parent 15c29ebf2c
commit a6808f07ab
6 changed files with 22 additions and 25 deletions

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008, 2020 QNX Software Systems and others.
* Copyright (c) 2008, 2021 QNX Software Systems and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@ -13,6 +13,7 @@
* Andy Jin - Hardware debugging UI improvements, bug 229946
* John Dallaway - Provide 'reset and halt' command, bug 550963
* John Dallaway - Eliminate deprecated API, bug 566462
* John Dallaway - Override default delay implementation, bug 576811
*******************************************************************************/
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
@ -20,6 +21,11 @@ import java.util.Collection;
public class AbatronBDI2000 extends DefaultGDBJtagConnectionImpl {
@Override
public void doDelay(int delay, Collection<String> commands) {
addCmd(commands, "monitor delay " + String.valueOf(delay * 1000)); //$NON-NLS-1$
}
@Override
public void doResetAndHalt(Collection<String> commands) {
addCmd(commands, "monitor reset halt"); //$NON-NLS-1$

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008, 2020 QNX Software Systems and others.
* Copyright (c) 2008, 2021 QNX Software Systems and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@ -13,6 +13,7 @@
* Andy Jin - Hardware debugging UI improvements, bug 229946
* John Dallaway - Use GDB/MI for temporary breakpoint, bug 525726
* John Dallaway - Eliminate deprecated API, bug 566462
* John Dallaway - Generalize default delay implementation, bug 576811
*******************************************************************************/
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
@ -32,7 +33,10 @@ public class DefaultGDBJtagDeviceImpl implements IGDBJtagDevice {
@Override
public void doDelay(int delay, Collection<String> commands) {
String cmd = "monitor delay " + String.valueOf(delay * 1000); //$NON-NLS-1$
// sleep is available on most hosts (including Cygwin and MSYS2) as
// part of the coreutils package but extenders should override this
// method to use an equivalent GDB "monitor" command if available
String cmd = "shell sleep " + String.valueOf(delay); //$NON-NLS-1$
addCmd(commands, cmd);
}

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008, 2020 QNX Software Systems and others.
* Copyright (c) 2008, 2021 QNX Software Systems and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@ -12,6 +12,7 @@
* QNX Software Systems - Initial API and implementation
* Andy Jin - Hardware debugging UI improvements, bug 229946
* John Dallaway - Eliminate deprecated API, bug 566462
* John Dallaway - Use default delay implementation, bug 576811
*******************************************************************************/
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
@ -19,16 +20,14 @@ import java.util.Collection;
public class GenericDevice extends DefaultGDBJtagConnectionImpl {
@Override
public void doDelay(int delay, Collection<String> commands) {
}
@Override
public void doHalt(Collection<String> commands) {
/* not supported */
}
@Override
public void doReset(Collection<String> commands) {
/* not supported */
}
}

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008, 2020 QNX Software Systems and others.
* Copyright (c) 2008, 2021 QNX Software Systems and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@ -13,6 +13,7 @@
* Andy Jin - Hardware debugging UI improvements, bug 229946
* John Dallaway - PEmicro extension, bug 552597
* John Dallaway - Eliminate deprecated API, bug 566462
* John Dallaway - Use default delay implementation, bug 576811
*******************************************************************************/
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
@ -23,11 +24,6 @@ import java.util.Collection;
*/
public class PEMicro extends DefaultGDBJtagConnectionImpl {
@Override
public void doDelay(int delay, Collection<String> commands) {
/* not supported */
}
@Override
public void doHalt(Collection<String> commands) {
/* not supported */

View file

@ -12,6 +12,7 @@
* QNX Software Systems - Initial API and implementation
* Andy Jin - Hardware debugging UI improvements, bug 229946
* John Dallaway - PyOCD extension, bug 574928
* John Dallaway - Use default delay implementation, bug 576811
*******************************************************************************/
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
@ -22,11 +23,6 @@ import java.util.Collection;
*/
public class PyOCD extends DefaultGDBJtagConnectionImpl {
@Override
public void doDelay(int delay, Collection<String> commands) {
/* not supported */
}
@Override
public void doReset(Collection<String> commands) {
addCmd(commands, "monitor reset"); //$NON-NLS-1$

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008, 2020 QNX Software Systems and others.
* Copyright (c) 2008, 2021 QNX Software Systems and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@ -13,6 +13,7 @@
* Andy Jin - Hardware debugging UI improvements, bug 229946
* John Dallaway - ST-LINK extension, bug 558266
* John Dallaway - Eliminate deprecated API, bug 566462
* John Dallaway - Use default delay implementation, bug 576811
*******************************************************************************/
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
@ -23,11 +24,6 @@ import java.util.Collection;
*/
public class STLink extends DefaultGDBJtagConnectionImpl {
@Override
public void doDelay(int delay, Collection<String> commands) {
/* not supported */
}
@Override
public void doHalt(Collection<String> commands) {
/* not supported */