From 86c55d882149be600534104814fa2b520f363a0a Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Thu, 9 Jan 2014 11:45:57 -0500 Subject: [PATCH] Bug 413437 - Disable 'delay' command when appropriate. This was a bug introduced when we ported hardware debug to DSF. Change-Id: I5232ab1e2e345edac9df640836bf8c8413ac6a36 Signed-off-by: Marc Khouzam --- .../gdbjtag/core/GDBJtagDSFFinalLaunchSequence.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence.java index 121c4f553cd..e7b7d64d453 100644 --- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence.java +++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007 - 2013 QNX Software Systems and others. + * Copyright (c) 2007, 2014 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 @@ -14,6 +14,7 @@ * John Dallaway - Wrong groupId during initialization (Bug 349736) * 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) *******************************************************************************/ package org.eclipse.cdt.debug.gdbjtag.core; @@ -353,10 +354,15 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence { /** @since 8.2 */ @Execute public void stepDelayStartup(final RequestMonitor rm) { - int defaultDelay = fGdbJtagDevice.getDefaultDelay(); + // The delay is also controlled by the RESET attribute. + if (CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_DO_RESET, IGDBJtagConstants.DEFAULT_DO_RESET)) { + int defaultDelay = fGdbJtagDevice.getDefaultDelay(); List commands = new ArrayList(); fGdbJtagDevice.doDelay(CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_DELAY, defaultDelay), commands); - queueCommands(commands, rm); + queueCommands(commands, rm); + } else { + rm.done(); + } } /*