From 863c45ab6c551356da07af378c99c5e1c5c40dba Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Fri, 2 Apr 2004 00:05:34 +0000 Subject: [PATCH] Changes and additions to support the new implementations of Shared Libraries, Signals and Disassembly views. --- debug/org.eclipse.cdt.debug.core/ChangeLog | 18 ++++ .../debug/core/model/CDebugElementState.java | 43 ++++++++++ .../cdt/debug/core/model/IAsmInstruction.java | 60 +++++++++++++ .../cdt/debug/core/model/ICDebugElement.java | 26 ++++++ .../cdt/debug/core/model/ICDebugTarget.java | 79 +++++++++++++++-- .../debug/core/model/ICDebugTargetGroup.java | 20 +++++ .../cdt/debug/core/model/ICSharedLibrary.java | 31 +++---- .../cdt/debug/core/model/ICSignal.java | 86 +++++++++++++++---- .../cdt/debug/core/model/ICStackFrame.java | 57 ++++++++++++ .../cdt/debug/core/model/IDisassembly.java | 41 +++++++++ .../internal/core/CSharedLibraryManager.java | 2 +- .../debug/internal/core/CSignalManager.java | 2 +- .../internal/core/model/CDebugElement.java | 26 +++++- .../internal/core/model/CDebugTarget.java | 65 ++++++++++++++ .../debug/internal/core/model/CSignal.java | 13 ++- 15 files changed, 520 insertions(+), 49 deletions(-) create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/CDebugElementState.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IAsmInstruction.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICDebugElement.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICDebugTargetGroup.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICStackFrame.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IDisassembly.java diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog index 1aeefb5cbd8..fa9477e158a 100644 --- a/debug/org.eclipse.cdt.debug.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.core/ChangeLog @@ -1,3 +1,21 @@ +2004-04-01 Mikhail Khodjaiants + Changes and additions to support the new implementations of Shared Libraries, + Signals and Disassembly views. + * CDebugElementState.java + * IAsmInstruction.java + * ICDebugElement.java + * ICDebugTarget.java + * ICDebugTargetGroup.java + * ICSharedLibrary.java + * ICSignal.java + * ICStackFrame.java + * IDisassembly.java + * CSharedLibraryManager.java + * CSignalManager.java + * CDebugElement.java + * CDebugTarget.java + * CSignal.java + 2004-03-31 Mikhail Khodjaiants Added default preferences to the C/C++ Debug preference page. * CDebugCorePlugin.java diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/CDebugElementState.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/CDebugElementState.java new file mode 100644 index 00000000000..19a0519cb92 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/CDebugElementState.java @@ -0,0 +1,43 @@ +/********************************************************************** + * Copyright (c) 2004 QNX Software Systems and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * QNX Software Systems - Initial API and implementation +***********************************************************************/ +package org.eclipse.cdt.debug.core.model; + +/** + * The state of a debug element. + */ +public class CDebugElementState { + + private final String fName; + + private CDebugElementState( String name ) { + this.fName = name; + } + + public String toString() { + return this.fName; + } + + public static final CDebugElementState UNDEFINED = new CDebugElementState( "undefined" ); //$NON-NLS-1$ + public static final CDebugElementState TERMINATING = new CDebugElementState( "terminating" ); //$NON-NLS-1$ + public static final CDebugElementState TERMINATED = new CDebugElementState( "terminated" ); //$NON-NLS-1$ + public static final CDebugElementState DISCONNECTING = new CDebugElementState( "disconnecting" ); //$NON-NLS-1$ + public static final CDebugElementState DISCONNECTED = new CDebugElementState( "disconnected" ); //$NON-NLS-1$ + public static final CDebugElementState RESUMING = new CDebugElementState( "resuming" ); //$NON-NLS-1$ + public static final CDebugElementState RESUMED = new CDebugElementState( "resumed" ); //$NON-NLS-1$ + public static final CDebugElementState STEPPING = new CDebugElementState( "stepping" ); //$NON-NLS-1$ + public static final CDebugElementState SUSPENDING = new CDebugElementState( "suspending" ); //$NON-NLS-1$ + public static final CDebugElementState SUSPENDED = new CDebugElementState( "suspended" ); //$NON-NLS-1$ + public static final CDebugElementState EVALUATING = new CDebugElementState( "evaluating" ); //$NON-NLS-1$ + public static final CDebugElementState EVALUATED = new CDebugElementState( "evaluated" ); //$NON-NLS-1$ + public static final CDebugElementState CHANGING = new CDebugElementState( "changing" ); //$NON-NLS-1$ + public static final CDebugElementState CHANGED = new CDebugElementState( "changed" ); //$NON-NLS-1$ + public static final CDebugElementState POSTMORTEM = new CDebugElementState( "postmortem" ); //$NON-NLS-1$ +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IAsmInstruction.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IAsmInstruction.java new file mode 100644 index 00000000000..3f8025cfee7 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IAsmInstruction.java @@ -0,0 +1,60 @@ +/********************************************************************** + * Copyright (c) 2004 QNX Software Systems and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * QNX Software Systems - Initial API and implementation +***********************************************************************/ +package org.eclipse.cdt.debug.core.model; + +/** + * An instruction of disassemby. + */ +public interface IAsmInstruction { + + /** + * Returns the address of this instruction. + * + * @return the address of this instruction + */ + long getAdress(); + + /** + * Returns the function name of this instruction, + * or empty string if function is not available. + * + * @return the function name of this instruction + */ + String getFunctionName(); + + /** + * Returns the instruction's text. + * + * @return the instruction's text. + */ + String getInstructionText(); + + /** + * Returns the opcode of this instruction. + * + * @return the opcode of this instruction + */ + String getOpcode(); + + /** + * Returns the arguments to the opcode. + * + * @return the arguments to the opcode + */ + String getArguments(); + + /** + * Returns the offset of this machine instruction. + * + * @return the offset of this machine instruction + */ + long getOffset(); +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICDebugElement.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICDebugElement.java new file mode 100644 index 00000000000..081b5a79262 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICDebugElement.java @@ -0,0 +1,26 @@ +/********************************************************************** + * Copyright (c) 2004 QNX Software Systems and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * QNX Software Systems - Initial API and implementation +***********************************************************************/ +package org.eclipse.cdt.debug.core.model; + +import org.eclipse.core.runtime.IStatus; +import org.eclipse.debug.core.model.IDebugElement; + +/** + * C/C++ specific extension of ICDebugElement. + */ +public interface ICDebugElement extends IDebugElement { + + public CDebugElementState getState(); + + public IStatus getStatus(); + + public String getSubModelIdentifier(); +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICDebugTarget.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICDebugTarget.java index e64a882d8ed..071e4c28076 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICDebugTarget.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICDebugTarget.java @@ -1,16 +1,20 @@ -/* - *(c) Copyright QNX Software Systems Ltd. 2002. - * All Rights Reserved. +/********************************************************************** + * Copyright (c) 2004 QNX Software Systems and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html * - */ + * Contributors: + * QNX Software Systems - Initial API and implementation +***********************************************************************/ package org.eclipse.cdt.debug.core.model; +import org.eclipse.debug.core.DebugException; import org.eclipse.debug.core.model.IDebugTarget; /** - * A C/C++ specific extension of IDebugTarget. - * - * @since: Dec 2, 2002 + * C/C++ extension of IDebugTarget. */ public interface ICDebugTarget extends IDebugTarget, ICDebugTargetType, @@ -24,6 +28,63 @@ public interface ICDebugTarget extends IDebugTarget, IJumpToAddress, IResumeWithoutSignal, IState, - ISwitchToThread -{ + ISwitchToThread, + ICDebugElement { + + /** + * Returns the shared libraries loaded in this debug target. An + * empty collection is returned if no shared libraries are loaded. + * + * @return a collection of shred libraries + * + * @throws DebugException + */ + public ICSharedLibrary[] getSharedLibraries() throws DebugException; + + /** + * Returns whether there are shared libraries currently loaded in this debug target. + * + * @return whether there are shared libraries currently loaded in this debug target + * + * @throws DebugException + */ + public boolean hasSharedLibraries() throws DebugException; + + /** + * Load the symbols of all shared objects. + * + * @throws DebugException + */ + public void loadSymbols() throws DebugException; + + /** + * Returns whether this target is little endian. + * + * @return whether this target is little endian + */ + public boolean isLittleEndian(); + + /** + * Returns whether this target supports signals. + * + * @return whether this target supports signals + * @throws DebugException if this method fails. + */ + public boolean hasSignals() throws DebugException; + + /** + * Returns the list of signals defined for this target. + * + * @return the list of signals defined for this target + * @throws DebugException if this method fails. + */ + public ICSignal[] getSignals() throws DebugException; + + /** + * Returns the disassembly provider of this debug target. + * + * @return the disassembly provider of this debug target + * @throws DebugException if this method fails. + */ + public IDisassembly getDisassembly() throws DebugException; } diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICDebugTargetGroup.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICDebugTargetGroup.java new file mode 100644 index 00000000000..35531c77bd7 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICDebugTargetGroup.java @@ -0,0 +1,20 @@ +/********************************************************************** + * Copyright (c) 2004 QNX Software Systems and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * QNX Software Systems - Initial API and implementation +***********************************************************************/ +package org.eclipse.cdt.debug.core.model; + +import org.eclipse.debug.core.model.IDebugTarget; + +/** + * Represents a group of C/C++ debug targets. + */ +public interface ICDebugTargetGroup extends IDebugTarget, ICDebugElement { + +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICSharedLibrary.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICSharedLibrary.java index c4676ad7c7a..65ea35cdd21 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICSharedLibrary.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICSharedLibrary.java @@ -1,27 +1,30 @@ -/* - *(c) Copyright QNX Software Systems Ltd. 2002. - * All Rights Reserved. +/********************************************************************** + * Copyright (c) 2004 QNX Software Systems and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html * - */ + * Contributors: + * QNX Software Systems - Initial API and implementation +***********************************************************************/ package org.eclipse.cdt.debug.core.model; import org.eclipse.debug.core.DebugException; import org.eclipse.debug.core.model.IDebugElement; /** - * Enter type comment. - * - * @since: Jan 15, 2003 + * Represents a shared library. */ -public interface ICSharedLibrary extends IDebugElement -{ +public interface ICSharedLibrary extends IDebugElement { + /** * Returns the name of shared library file. * * @return the name of shared library file */ String getFileName(); - + /** * Returns the start address of this library. * @@ -38,17 +41,15 @@ public interface ICSharedLibrary extends IDebugElement /** * Returns whether the symbols of this library are read. - * + * * @return whether the symbols of this library are read */ boolean areSymbolsLoaded(); - + /** * Loads the library symbols. * - * @throws DebugException if this method fails. Reasons include: + * @throws DebugException if this method fails. Reasons include: */ void loadSymbols() throws DebugException; - - void dispose(); } diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICSignal.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICSignal.java index 3ab35fc1567..2ff7134e348 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICSignal.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICSignal.java @@ -1,33 +1,83 @@ -/* - *(c) Copyright QNX Software Systems Ltd. 2002. - * All Rights Reserved. +/********************************************************************** + * Copyright (c) 2004 QNX Software Systems and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html * - */ + * Contributors: + * QNX Software Systems - Initial API and implementation +***********************************************************************/ package org.eclipse.cdt.debug.core.model; import org.eclipse.debug.core.DebugException; -import org.eclipse.debug.core.model.IDebugElement; /** - * Enter type comment. - * - * @since: Jan 31, 2003 + * Represents a signal. + * + * @since: Mar 5, 2004 */ -public interface ICSignal extends IDebugElement -{ - String getName(); +public interface ICSignal extends ICDebugElement { - String getDescription(); + /** + * Returns the name of this signal + * + * @return this signal's name + * @throws DebugException if this method fails. + */ + public String getName() throws DebugException; - boolean isPassEnabled(); + /** + * Returns the description of this signal. + * + * @return this signal's description + * @throws DebugException if this method fails. + */ + public String getDescription() throws DebugException; - boolean isStopEnabled(); + /** + * Returns whether "pass" is in effect for this signal. + * + * @return whether "pass" is in effect for this signal + * @throws DebugException if this method fails. + */ + public boolean isPassEnabled() throws DebugException; - void setPassEnabled( boolean enable ) throws DebugException; + /** + * Returns whether "stop" is in effect for this signal. + * + * @return whether "stop" is in effect for this signal + * @throws DebugException if this method fails. + */ + public boolean isStopEnabled() throws DebugException; - void setStopEnabled( boolean enable ) throws DebugException; + /** + * Enables/disables the "pass" flag of this signal. + * + * @param enable the flag value to set + * @throws DebugException if this method fails. + */ + public void setPassEnabled( boolean enable ) throws DebugException; + + /** + * Enables/disables the "stop" flag of this signal. + * + * @param enable the flag value to set + * @throws DebugException if this method fails. + */ + public void setStopEnabled( boolean enable ) throws DebugException; - void signal() throws DebugException; + /** + * Resumes execution, but immediately gives the target this signal. + * + * @throws DebugException if this method fails. + */ + public void signal() throws DebugException; - void dispose(); + /** + * Returns whether modification is allowed for this signal's parameters. + * + * @return whether modification is allowed for this signal's parameters + */ + public boolean canModify(); } diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICStackFrame.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICStackFrame.java new file mode 100644 index 00000000000..f2a36260b7a --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICStackFrame.java @@ -0,0 +1,57 @@ +/********************************************************************** + * Copyright (c) 2004 QNX Software Systems and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * QNX Software Systems - Initial API and implementation +***********************************************************************/ +package org.eclipse.cdt.debug.core.model; + +import org.eclipse.debug.core.model.IStackFrame; + +/** + * C/C++ extension of IStackFrame. + */ +public interface ICStackFrame extends IStackFrame, ICDebugElement { + + /** + * Returns the address of this stack frame. + * + * @return the address of this stack frame + */ + public long getAddress(); + + /** + * Returns the source file of this stack frame or null + * if the source file is unknown. + * + * @return the source file of this stack frame + */ + public String getFile(); + + /** + * Returns the function of this stack frame or null + * if the function is unknown. + * + * @return the function of this stack frame + */ + public String getFunction(); + + /** + * Returns the line number of this stack frame or 0 + * if the line number is unknown. + * + * @return the line number of this stack frame + */ + public int getFrameLineNumber(); + + /** + * Returns the level of this stack frame. + * + * @return the level of this stack frame + */ + public int getLevel(); +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IDisassembly.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IDisassembly.java new file mode 100644 index 00000000000..11e6cd6ea08 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IDisassembly.java @@ -0,0 +1,41 @@ +/********************************************************************** + * Copyright (c) 2004 QNX Software Systems and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * QNX Software Systems - Initial API and implementation +***********************************************************************/ +package org.eclipse.cdt.debug.core.model; + +import org.eclipse.debug.core.DebugException; + +/** + * Represents the disassembly of a debug target. + */ +public interface IDisassembly extends ICDebugElement { + + /** + * Returns the list of disassembly instructions associated + * with the given stack frame. + * + * @param frame the stack frame for which the instructions re required. + * @return the list of disassembly instructions associated with + * the given stack frame + * @throws DebugException if this method fails. + */ + public IAsmInstruction[] getInstructions( ICStackFrame frame ) throws DebugException; + + /** + * Returns the list of disassembly instructions that begins at the given address. + * The size of the requested list is specified by length. + * + * @param address the start address + * @param length the size of the requested list + * @return the specified list of disassembly instructions + * @throws DebugException if this method fails. + */ + public IAsmInstruction[] getInstructions( long address, int length ) throws DebugException; +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CSharedLibraryManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CSharedLibraryManager.java index 017e93ba72f..1c732aa85e5 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CSharedLibraryManager.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CSharedLibraryManager.java @@ -97,7 +97,7 @@ public class CSharedLibraryManager extends CUpdateManager implements ICSharedLib Iterator it = fSharedLibraries.iterator(); while( it.hasNext() ) { - ((ICSharedLibrary)it.next()).dispose(); + ((CSharedLibrary)it.next()).dispose(); } fSharedLibraries.clear(); } diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CSignalManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CSignalManager.java index 2b83ae9a0bd..c3853d262a7 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CSignalManager.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CSignalManager.java @@ -71,7 +71,7 @@ public class CSignalManager extends CUpdateManager implements ICSignalManager if ( fSignals != null ) for ( int i = 0; i < fSignals.length; ++i ) { - fSignals[i].dispose(); + ((CSignal)fSignals[i]).dispose(); } fSignals = null; fIsDisposed = true; diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugElement.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugElement.java index 077ff03816f..37781d34102 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugElement.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugElement.java @@ -12,6 +12,8 @@ import org.eclipse.cdt.debug.core.CDebugUtils; import org.eclipse.cdt.debug.core.cdi.CDIException; import org.eclipse.cdt.debug.core.cdi.ICDISession; import org.eclipse.cdt.debug.core.cdi.model.ICDITarget; +import org.eclipse.cdt.debug.core.model.CDebugElementState; +import org.eclipse.cdt.debug.core.model.ICDebugElement; import org.eclipse.cdt.debug.core.model.ICDebugElementErrorStatus; import org.eclipse.cdt.debug.internal.core.ICDebugInternalConstants; import org.eclipse.core.runtime.IStatus; @@ -31,7 +33,7 @@ import org.eclipse.debug.core.model.IDebugTarget; * @since Aug 1, 2002 */ public class CDebugElement extends PlatformObject - implements IDebugElement, + implements ICDebugElement, ICDebugElementErrorStatus { private CDebugTarget fDebugTarget; @@ -357,4 +359,26 @@ public class CDebugElement extends PlatformObject { return fMessage; } + + /* (non-Javadoc) + * @see org.eclipse.cdt.debug.core.model.ICDebugElement#getState() + */ + public CDebugElementState getState() { + // TODO Auto-generated method stub + return null; + } + /* (non-Javadoc) + * @see org.eclipse.cdt.debug.core.model.ICDebugElement#getStatus() + */ + public IStatus getStatus() { + // TODO Auto-generated method stub + return null; + } + /* (non-Javadoc) + * @see org.eclipse.cdt.debug.core.model.ICDebugElement#getSubModelIdentifier() + */ + public String getSubModelIdentifier() { + // TODO Auto-generated method stub + return null; + } } diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java index 977f1c83b2d..c30845a020d 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java @@ -58,7 +58,10 @@ import org.eclipse.cdt.debug.core.model.ICDebugElementErrorStatus; import org.eclipse.cdt.debug.core.model.ICDebugTarget; import org.eclipse.cdt.debug.core.model.ICDebugTargetType; import org.eclipse.cdt.debug.core.model.ICExpressionEvaluator; +import org.eclipse.cdt.debug.core.model.ICSharedLibrary; +import org.eclipse.cdt.debug.core.model.ICSignal; import org.eclipse.cdt.debug.core.model.IDebuggerProcessSupport; +import org.eclipse.cdt.debug.core.model.IDisassembly; import org.eclipse.cdt.debug.core.model.IExecFileInfo; import org.eclipse.cdt.debug.core.model.IGlobalVariable; import org.eclipse.cdt.debug.core.model.IJumpToAddress; @@ -2387,4 +2390,66 @@ public class CDebugTarget extends CDebugElement } return result; } + + /* (non-Javadoc) + * @see org.eclipse.cdt.debug.core.model.ICDebugTarget#getDisassembly() + */ + public IDisassembly getDisassembly() throws DebugException { + // TODO Auto-generated method stub + return null; + } + + /* (non-Javadoc) + * @see org.eclipse.cdt.debug.core.model.ICDebugTarget#getSharedLibraries() + */ + public ICSharedLibrary[] getSharedLibraries() throws DebugException { + ICSharedLibraryManager slm = getSharedLibraryManager(); + if ( slm != null ) { + return slm.getSharedLibraries(); + } + return new ICSharedLibrary[0]; + } + + /* (non-Javadoc) + * @see org.eclipse.cdt.debug.core.model.ICDebugTarget#getSignals() + */ + public ICSignal[] getSignals() throws DebugException { + ICSignalManager sm = getSignalManager(); + if ( sm != null ) { + return sm.getSignals(); + } + return new ICSignal[0]; + } + + /* (non-Javadoc) + * @see org.eclipse.cdt.debug.core.model.ICDebugTarget#hasSharedLibraries() + */ + public boolean hasSharedLibraries() throws DebugException { + ICSharedLibraryManager slm = getSharedLibraryManager(); + if ( slm != null ) { + return ( slm.getSharedLibraries().length > 0 ); + } + return false; + } + + /* (non-Javadoc) + * @see org.eclipse.cdt.debug.core.model.ICDebugTarget#hasSignals() + */ + public boolean hasSignals() throws DebugException { + ICSignalManager sm = getSignalManager(); + if ( sm != null ) { + return ( sm.getSignals().length > 0 ); + } + return false; + } + + /* (non-Javadoc) + * @see org.eclipse.cdt.debug.core.model.ICDebugTarget#loadSymbols() + */ + public void loadSymbols() throws DebugException { + ICSharedLibraryManager slm = getSharedLibraryManager(); + if ( slm != null ) { + slm.loadSymbolsForAll(); + } + } } diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CSignal.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CSignal.java index 0aba703707c..03974974c93 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CSignal.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CSignal.java @@ -35,7 +35,7 @@ public class CSignal extends CDebugElement implements ICSignal, ICDIEventListene /* (non-Javadoc) * @see org.eclipse.cdt.debug.core.model.ICSignal#getDescription() */ - public String getDescription() + public String getDescription() throws DebugException { return getCDISignal().getDescription(); } @@ -43,7 +43,7 @@ public class CSignal extends CDebugElement implements ICSignal, ICDIEventListene /* (non-Javadoc) * @see org.eclipse.cdt.debug.core.model.ICSignal#getName() */ - public String getName() + public String getName() throws DebugException { return getCDISignal().getName(); } @@ -51,7 +51,7 @@ public class CSignal extends CDebugElement implements ICSignal, ICDIEventListene /* (non-Javadoc) * @see org.eclipse.cdt.debug.core.model.ICSignal#isPassEnabled() */ - public boolean isPassEnabled() + public boolean isPassEnabled() throws DebugException { return !getCDISignal().isIgnore(); } @@ -59,7 +59,7 @@ public class CSignal extends CDebugElement implements ICSignal, ICDIEventListene /* (non-Javadoc) * @see org.eclipse.cdt.debug.core.model.ICSignal#isStopEnabled() */ - public boolean isStopEnabled() + public boolean isStopEnabled() throws DebugException { return getCDISignal().isStopSet(); } @@ -126,4 +126,9 @@ public class CSignal extends CDebugElement implements ICSignal, ICDIEventListene targetRequestFailed( e.getMessage(), null ); } } + + public boolean canModify() { + // TODO add canModify method to ICDISignal + return true; + } }