1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-09-02 13:13:36 +02:00

partial fix for Bugzilla 265882

This commit is contained in:
Randy Rohrbach 2009-02-26 21:37:24 +00:00
parent 6b307c50cb
commit 640102e1ee
24 changed files with 86 additions and 64 deletions

View file

@ -41,7 +41,7 @@ public class GdbUncallCommand extends GdbAbstractReverseStepCommand implements I
@Override
protected final StepType getStepType() {
boolean instructionSteppingEnabled = getSteppingMode() != null && getSteppingMode().isInstructionSteppingEnabled();
return instructionSteppingEnabled ? StepType.INSTRUCTION_STEP_RETUTRN : StepType.STEP_RETURN;
return instructionSteppingEnabled ? StepType.INSTRUCTION_STEP_RETURN : StepType.STEP_RETURN;
}
}

View file

@ -27,7 +27,6 @@ import org.eclipse.cdt.dsf.datamodel.IDMContext;
import org.eclipse.cdt.dsf.debug.service.ICachingService;
import org.eclipse.cdt.dsf.debug.service.IRunControl;
import org.eclipse.cdt.dsf.debug.service.IStack;
import org.eclipse.cdt.dsf.debug.service.IStack2;
import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
import org.eclipse.cdt.dsf.debug.service.IRunControl.IResumedDMEvent;
import org.eclipse.cdt.dsf.debug.service.IRunControl.ISuspendedDMEvent;
@ -57,7 +56,7 @@ import org.eclipse.core.runtime.Status;
import org.osgi.framework.BundleContext;
public class MIStack extends AbstractDsfService
implements IStack2, ICachingService
implements IStack, ICachingService
{
protected static class MIFrameDMC extends AbstractDMContext
implements IFrameDMContext

View file

@ -24,7 +24,6 @@ import org.eclipse.cdt.dsf.datamodel.DMContexts;
import org.eclipse.cdt.dsf.datamodel.IDMContext;
import org.eclipse.cdt.dsf.debug.service.IRunControl;
import org.eclipse.cdt.dsf.debug.service.IStack;
import org.eclipse.cdt.dsf.debug.service.IStack2;
import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext;
import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerSuspendedDMEvent;
import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
@ -190,14 +189,13 @@ public class StackFramesVMNode extends AbstractDMVMNode
});
} else {
if (startIndex >= 0 && update.getLength() > 0 && stackService instanceof IStack2) {
if (startIndex >= 0 && update.getLength() > 0) {
// partial stack dump
IStack2 stackService2= (IStack2) stackService;
int endIndex= startIndex + update.getLength() - 1;
if (startIndex < stackFrameLimit && endIndex >= stackFrameLimit) {
endIndex = stackFrameLimit - 1;
}
stackService2.getFrames(
stackService.getFrames(
execDmc,
startIndex,
endIndex,

View file

@ -18,6 +18,11 @@ import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointDMContext;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.model.IBreakpoint;
/**
* Breakpoint attribute translator interface
*
* @since 1.0
*/
@ThreadSafeAndProhibitedFromDsfExecutor("")
public interface IBreakpointAttributeTranslator {

View file

@ -23,6 +23,8 @@ import org.eclipse.cdt.dsf.service.IDsfService;
/**
* Breakpoint service interface
*
* @since 1.0
*/
public interface IBreakpoints extends IDsfService {

View file

@ -14,6 +14,7 @@ import org.eclipse.cdt.dsf.datamodel.IDMContext;
/**
* Interface for services which use an internal cache for data.
*
* @since 1.1
*/
public interface ICachingService {

View file

@ -19,6 +19,8 @@ import org.eclipse.cdt.dsf.service.IDsfService;
/**
* Disassembly service interface
*
* @since 1.0
*/
public interface IDisassembly extends IDsfService {

View file

@ -30,6 +30,7 @@ import org.eclipse.core.runtime.CoreException;
* plugins that declare them are not loaded unless requested by a client.
*
* @see ICBreakpoint#getExtension(String, Class)
* @since 1.0
*/
public interface IDsfBreakpointExtension extends ICBreakpointExtension {

View file

@ -15,6 +15,7 @@ import org.eclipse.cdt.dsf.service.DsfSession;
/**
* A factory to create DSF services. Using this interface allows
* to easily have different service implementation for different backends.
*
* @since 1.1
*/
public interface IDsfDebugServicesFactory {

View file

@ -24,6 +24,8 @@ import org.eclipse.cdt.dsf.datamodel.IDMEvent;
* Expressions service provides access to the debugger's expression evaluator. This service has
* dependencies on the Stack service, as it is be used to provide context for an
* expression to be evaluated.
*
* @since 1.0
*/
@SuppressWarnings("nls")
public interface IExpressions extends IFormattedValues {

View file

@ -17,6 +17,13 @@ import org.eclipse.cdt.dsf.datamodel.IDMContext;
import org.eclipse.cdt.dsf.datamodel.IDMData;
import org.eclipse.cdt.dsf.datamodel.IDMService;
/**
* Formatted values interface describes the kinds of formatted information
* which may be returned and the methods for obtaining and manipulating
* those values.
*
* @since 1.0
*/
public interface IFormattedValues extends IDMService {
/** Marker interface for a DMC that has a formatted value. */

View file

@ -15,6 +15,8 @@ import java.math.BigInteger;
/**
* Represents an assembly instruction
*
* @since 1.0
*/
public interface IInstruction {

View file

@ -24,6 +24,8 @@ import org.eclipse.debug.core.model.MemoryByte;
* Service for accessing memory. Memory contexts are not meant to be
* represented in tree or table views, so it doesn't need to implement
* IDMService interface.
*
* @since 1.0
*/
public interface IMemory extends IDsfService {

View file

@ -13,6 +13,8 @@ package org.eclipse.cdt.dsf.debug.service;
/**
* Represents the assembly instruction(s) corresponding to a source line
*
* @since 1.0
*/
public interface IMixedInstruction {

View file

@ -18,6 +18,8 @@ import org.eclipse.cdt.dsf.service.IDsfService;
/**
* Debugger service representing module handling logic of a debugger.
*
* @since 1.0
*/
public interface IModules extends IDsfService {

View file

@ -25,6 +25,7 @@ import org.eclipse.cdt.dsf.datamodel.IDMService;
* information, manipulation methods, and debugging methods.
* This service provides a relatively simple interface for
* manipulating processes as compared with a full-blown
*
* remote target debugger.
* @since 1.1
*/

View file

@ -18,6 +18,8 @@ import org.eclipse.cdt.dsf.datamodel.IDMEvent;
/**
* Service for accessing register data.
*
* @since 1.0
*/
public interface IRegisters extends IFormattedValues {

View file

@ -25,6 +25,8 @@ import org.eclipse.cdt.dsf.datamodel.IDMService;
* even have methods for getting labels. That's because it is expected that
* higher level services, ones that deal with processes, kernels, or target
* features will provide that functionality.
*
* @since 1.0
*/
public interface IRunControl extends IDMService
{
@ -120,7 +122,18 @@ public interface IRunControl extends IDMService
boolean isSuspended(IExecutionDMContext context);
void resume(IExecutionDMContext context, RequestMonitor requestMonitor);
void suspend(IExecutionDMContext context, RequestMonitor requestMonitor);
public enum StepType { STEP_OVER, STEP_INTO, STEP_RETURN, INSTRUCTION_STEP_OVER, INSTRUCTION_STEP_INTO, INSTRUCTION_STEP_RETUTRN };
public enum StepType {
STEP_OVER,
STEP_INTO,
STEP_RETURN,
INSTRUCTION_STEP_OVER,
INSTRUCTION_STEP_INTO,
/**
* @since 2.0
*/
INSTRUCTION_STEP_RETURN };
boolean isStepping(IExecutionDMContext context);
void canStep(IExecutionDMContext context, StepType stepType, DataRequestMonitor<Boolean> rm);
void step(IExecutionDMContext context, StepType stepType, RequestMonitor requestMonitor);

View file

@ -14,7 +14,9 @@ import org.eclipse.cdt.dsf.datamodel.IDMContext;
import org.eclipse.cdt.dsf.service.IDsfService;
/**
* Place holder interface for a signals implementation.
*
* @since 1.0
*/
public interface ISignals extends IDsfService {
/**

View file

@ -20,6 +20,8 @@ import org.eclipse.cdt.dsf.service.IDsfService;
* primarily by other services that need to access source-path mappings, such
* as the breakpoints service. For UI components, the platform source lookup
* interfaces could be sufficient.
*
* @since 1.0
*/
public interface ISourceLookup extends IDsfService {

View file

@ -19,6 +19,8 @@ import org.eclipse.cdt.dsf.datamodel.IDMService;
/**
* Stack service provides access to stack information for a
* given execution context.
*
* @since 1.0
*/
public interface IStack extends IDMService {
@ -81,12 +83,36 @@ public interface IStack extends IDMService {
*/
void getFrames(IDMContext execContext, DataRequestMonitor<IFrameDMContext[]> rm);
/**
* When passed in the endIndex of getFrames(...) it indicates that all stack frames are to be retrieved.
* @since 2.0
*/
public final static int ALL_FRAMES = -1;
/**
* Retrieves list of stack frames for the given execution context. Request
* will fail if the stack frame data is not available.
* <p>The range of stack frames can be limited by the <code>startIndex</code> and <code>endIndex</code> arguments.
* It is no error to specify an <code>endIndex</code> exceeding the number of available stack frames.
* A negative value for <code>endIndex</code> means to retrieve all stack frames. <code>startIndex</code> must be a non-negative value.
* </p>
*
* @param execContext the execution context to retrieve stack frames for
* @param startIndex the index of the first frame to retrieve
* @param endIndex the index of the last frame to retrieve (inclusive) or {@link #ALL_FRAMES}
* @param rm the request monitor
*
* @see #getFrames(IDMContext, DataRequestMonitor)
* @since 2.0
*/
public abstract void getFrames(IDMContext execContext, int startIndex, int endIndex, DataRequestMonitor<IFrameDMContext[]> rm);
/**
* Retrieves the top stack frame for the given execution context.
* Retrieving just the top frame DMC and corresponding data can be much
* more efficient than just retrieving the whole stack, before the data
* is often included in the stopped event. Also for some UI functionality,
* such as setpping, only top stack frame is often needed.
* such as stepping, only top stack frame is often needed.
* @param execContext
* @param rm
*/
@ -110,6 +136,4 @@ public interface IStack extends IDMService {
* @param rm Callback
*/
void getStackDepth(IDMContext dmc, int maxDepth, DataRequestMonitor<Integer> rm);
}

View file

@ -1,49 +0,0 @@
/*******************************************************************************
* Copyright (c) 2008 Wind River Systems, Inc. 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.dsf.debug.service;
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
import org.eclipse.cdt.dsf.datamodel.IDMContext;
/**
* Stack service extension.
* <p>
* Adds the capability to retrieve a limited number of stack frames.
* </p>
*
* @since DSF 1.1
*/
public interface IStack2 extends IStack {
/**
* Convenience constant for use with {@link #getFrames(IDMContext, int, int, DataRequestMonitor)}
* to retrieve all stack frames.
*/
public final static int ALL_FRAMES = -1;
/**
* Retrieves list of stack frames for the given execution context. Request
* will fail if the stack frame data is not available.
* <p>The range of stack frames can be limited by the <code>startIndex</code> and <code>endIndex</code> arguments.
* It is no error to specify an <code>endIndex</code> exceeding the number of available stack frames.
* A negative value for <code>endIndex</code> means to retrieve all stack frames. <code>startIndex</code> must be a non-negative value.
* </p>
*
* @param execContext the execution context to retrieve stack frames for
* @param startIndex the index of the first frame to retrieve
* @param endIndex the index of the last frame to retrieve (inclusive) or {@link #ALL_FRAMES}
* @param rm the request monitor
*
* @see #getFrames(IDMContext, DataRequestMonitor)
*/
public abstract void getFrames(IDMContext execContext, int startIndex, int endIndex, DataRequestMonitor<IFrameDMContext[]> rm);
}

View file

@ -20,7 +20,9 @@ import org.eclipse.cdt.dsf.datamodel.IDMService;
* Service for accessing debugger symbols. This service builds on the Modules
* service, but not all debuggers provide access for parsing symbols so this
* service is separated.
*
* @see IModules
* @since 1.0
*/
public interface ISymbols extends IDMService {
public interface ISymbolObjectDMContext extends IDMContext {}
@ -37,7 +39,7 @@ public interface ISymbols extends IDMService {
/**
* Indicates that the list of symbol objects is changed. Parsing debug
* symbols can be a long running operation (order of 10's of seconds or
* minues), so it is useful for the service to provide access to the data
* minutes), so it is useful for the service to provide access to the data
* even while it's still parsing. This event may be issued periodically
* by the service to indicate that a section of debug symbols has been
* parsed.

View file

@ -23,7 +23,6 @@ import org.eclipse.cdt.dsf.datamodel.IDMContext;
import org.eclipse.cdt.dsf.debug.service.ICachingService;
import org.eclipse.cdt.dsf.debug.service.IRunControl;
import org.eclipse.cdt.dsf.debug.service.IStack;
import org.eclipse.cdt.dsf.debug.service.IStack2;
import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
import org.eclipse.cdt.dsf.debug.service.IRunControl.IResumedDMEvent;
import org.eclipse.cdt.dsf.debug.service.IRunControl.ISuspendedDMEvent;
@ -52,7 +51,7 @@ import org.osgi.framework.BundleContext;
* this service is initialized.
* </p>
*/
public class PDAStack extends AbstractDsfService implements IStack2, ICachingService {
public class PDAStack extends AbstractDsfService implements IStack, ICachingService {
/**
* PDA stack frame contains only the stack frame level. It is only