mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
First draft of the tracepoints in the CDI.
This commit is contained in:
parent
6deffd9b82
commit
7de234ff77
4 changed files with 305 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2003-05-26 Mikhail Khodjaiants
|
||||
First draft of the tracepoints in the CDI.
|
||||
* ICDITraceManager.java
|
||||
* ICDITraceSnapshot.java
|
||||
* ICDITracepoint.java
|
||||
|
||||
2003-05-23 Alain Magloire
|
||||
|
||||
* src/org/eclipse/cdt/debug/core/cdi/model/type/ICDIType.java: extends
|
||||
|
|
|
@ -0,0 +1,154 @@
|
|||
/*
|
||||
*(c) Copyright QNX Software Systems Ltd. 2002.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.eclipse.cdt.debug.core.cdi;
|
||||
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDITracepoint;
|
||||
|
||||
/**
|
||||
* Manages the collection of registered tracepoints and trace snapshoits
|
||||
* in the debug session. Provides methods to control tracing.
|
||||
*
|
||||
* @since May 15, 2003
|
||||
*/
|
||||
public interface ICDITraceManager extends ICDISessionObject {
|
||||
/**
|
||||
* Returns a collection of all tracepoints set for this session.
|
||||
* Returns an empty array if no tracepoints are set.
|
||||
*
|
||||
* @return a collection of all tracepoints set for this session
|
||||
* @throws CDIException on failure. Reasons include:
|
||||
*/
|
||||
ICDITracepoint[] getTracepoints() throws CDIException;
|
||||
|
||||
/**
|
||||
* Deletes the given tracepoint.
|
||||
*
|
||||
* @param tracepoint - a tracepoint to be deleted
|
||||
* @throws CDIException on failure. Reasons include:
|
||||
*/
|
||||
void deleteTracepoint( ICDITracepoint tracepoint ) throws CDIException;
|
||||
|
||||
/**
|
||||
* Deletes the given array of tracepoints.
|
||||
*
|
||||
* @param tracepoints - the array of tracepoints to be deleted
|
||||
* @throws CDIException on failure. Reasons include:
|
||||
*/
|
||||
void deleteTracepoints( ICDITracepoint[] tracepoints ) throws CDIException;
|
||||
|
||||
/**
|
||||
* Deletes all tracepoints.
|
||||
*
|
||||
* @throws CDIException on failure. Reasons include:
|
||||
*/
|
||||
void deleteAllTracepoints() throws CDIException;
|
||||
|
||||
/**
|
||||
* Sets a tracepoint at the given location.
|
||||
* The tracepoint is set acording to the choices:
|
||||
* <pre>
|
||||
* if location.getFile() != null then
|
||||
* if location.getFunction() != null then
|
||||
* tracepoint = file:function
|
||||
* else
|
||||
* tracepoint = file:line
|
||||
* else if (location.getFuntion() != null) then
|
||||
* tracepoint = function
|
||||
* else if (location.getLineNumber() != 0 then
|
||||
* tracepoint = line
|
||||
* else
|
||||
* tracepoint = address
|
||||
* end
|
||||
* </pre>
|
||||
*
|
||||
* @param location - the location
|
||||
* @return a tracepoint
|
||||
* @throws CDIException on failure. Reasons include:
|
||||
*/
|
||||
ICDITracepoint setTracepoint( ICDILocation location ) throws CDIException;
|
||||
|
||||
/**
|
||||
* Allows the manager to interrupt the excution of program
|
||||
* when setting a tracepoint.
|
||||
*/
|
||||
void allowProgramInterruption( boolean allow );
|
||||
|
||||
/**
|
||||
* Starts the tracing and begins collecting data.
|
||||
*
|
||||
* @throws CDIException on failure. Reasons include:
|
||||
*/
|
||||
void startTracing() throws CDIException;
|
||||
|
||||
/**
|
||||
* Stops the tracing and ends collecting data.
|
||||
*
|
||||
* @throws CDIException on failure. Reasons include:
|
||||
*/
|
||||
void stopTracing() throws CDIException;
|
||||
|
||||
/**
|
||||
* Returns the status of tracing.
|
||||
*
|
||||
* @return the status of tracing
|
||||
* @throws CDIException on failure. Reasons include:
|
||||
*/
|
||||
boolean isTracing() throws CDIException;
|
||||
|
||||
/**
|
||||
* Enables/disables the snapshot debugging mode.
|
||||
*
|
||||
* @param enabled <code>true</code> to enable, and <code>false</code>
|
||||
* to disable
|
||||
* @throws CDIException on failure. Reasons include:
|
||||
*/
|
||||
void enableSnapshotMode( boolean enabled ) throws CDIException;
|
||||
|
||||
/**
|
||||
* Returns all trace snapshots for this session.
|
||||
*
|
||||
* @return all trace snapshots for this session
|
||||
* @throws CDIException on failure. Reasons include:
|
||||
*/
|
||||
ICDITraceSnapshot[] getSnapshots() throws CDIException;
|
||||
|
||||
/**
|
||||
* Returns all trace snapshots associated with the given tracepoints.
|
||||
*
|
||||
* @param tracepoints - an array of tracepoints
|
||||
* @return all trace snapshots associated with the given tracepoints
|
||||
* @throws CDIException on failure. Reasons include:
|
||||
*/
|
||||
ICDITraceSnapshot[] getSnapshots( ICDITracepoint[] tracepoints ) throws CDIException;
|
||||
|
||||
/**
|
||||
* Returns all trace snapshots associated with the given locations.
|
||||
*
|
||||
* @param locations - an array of locations
|
||||
* @return all trace snapshots associated with the given locations
|
||||
* @throws CDIException on failure. Reasons include:
|
||||
*/
|
||||
ICDITraceSnapshot[] getSnapshots( ICDILocation[] locations ) throws CDIException;
|
||||
|
||||
/**
|
||||
* Creates an ICDILocation object for given file name and line number or function.
|
||||
*
|
||||
* @param file - a file name
|
||||
* @param function - a function name
|
||||
* @param line - a line number
|
||||
* @return an ICDILocation object
|
||||
*/
|
||||
ICDILocation createLocation( String file, String function, int line );
|
||||
|
||||
/**
|
||||
* Creates an ICDILocation object for given address.
|
||||
*
|
||||
* @param address - an address
|
||||
* @return an ICDILocation object
|
||||
*/
|
||||
ICDILocation createLocation( long address );
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
*(c) Copyright QNX Software Systems Ltd. 2002.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.eclipse.cdt.debug.core.cdi;
|
||||
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDITracepoint;
|
||||
|
||||
/**
|
||||
* Represents a trace snapshot in the debug session.
|
||||
*
|
||||
* @since May 15, 2003
|
||||
*/
|
||||
public interface ICDITraceSnapshot extends ICDISessionObject {
|
||||
|
||||
/**
|
||||
* Returns the number of this snapshot.
|
||||
*
|
||||
* @return the number of this snapshot
|
||||
*/
|
||||
int getNumber();
|
||||
|
||||
/**
|
||||
* Selects this snapshot.
|
||||
*
|
||||
* @throws CDIException on failure. Reasons include:
|
||||
*/
|
||||
void select() throws CDIException;
|
||||
|
||||
/**
|
||||
* Returns the data collected at this snapshot.
|
||||
*
|
||||
* @return the data collected at this snapshot
|
||||
* @throws CDIException on failure. Reasons include:
|
||||
*/
|
||||
ICDIObject[] getData() throws CDIException;
|
||||
|
||||
/**
|
||||
* Returns the array of tracepoints associated with this snapshot.
|
||||
*
|
||||
* @return array of tracepoints
|
||||
*/
|
||||
ICDITracepoint[] getTracepoints();
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
/*
|
||||
*(c) Copyright QNX Software Systems Ltd. 2002.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.eclipse.cdt.debug.core.cdi.model;
|
||||
|
||||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||
import org.eclipse.cdt.debug.core.cdi.ICDILocation;
|
||||
|
||||
/**
|
||||
* Defines a point in the program execution when the specified data to be collected.
|
||||
*
|
||||
* @since May 15, 2003
|
||||
*/
|
||||
public interface ICDITracepoint extends ICDIObject {
|
||||
|
||||
/**
|
||||
* Represents an action to be taken when the tracepoint is hit.
|
||||
*
|
||||
* @since May 15, 2003
|
||||
*/
|
||||
public interface IAction {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the location of this tracepoint.
|
||||
*
|
||||
* @return the location of this tracepoint
|
||||
* @throws CDIException if this method fails. Reasons include:
|
||||
*/
|
||||
ICDILocation getLocation() throws CDIException;
|
||||
|
||||
/**
|
||||
* Returns whether this tracepoint is enabled.
|
||||
*
|
||||
* @return whether this tracepoint is enabled
|
||||
* @throws CDIException if this method fails. Reasons include:
|
||||
*/
|
||||
boolean isEnabled() throws CDIException;
|
||||
|
||||
/**
|
||||
* Sets the enabled state of this tracepoint. This has no effect
|
||||
* if the current enabled state is the same as specified by
|
||||
* the enabled parameter.
|
||||
*
|
||||
* @param enabled - whether this tracepoint should be enabled
|
||||
* @throws CDIException if this method fails. Reasons include:
|
||||
*/
|
||||
void setEnabled( boolean enabled ) throws CDIException;
|
||||
|
||||
/**
|
||||
* Returns the passcount of this tracepoint.
|
||||
*
|
||||
* @return the passcount of this tracepoint
|
||||
* @throws CDIException if this method fails. Reasons include:
|
||||
*/
|
||||
int getPassCount() throws CDIException;
|
||||
|
||||
/**
|
||||
* Sets the passcount of this tracepoint.
|
||||
*
|
||||
* @param the passcount to set
|
||||
* @throws CDIException if this method fails. Reasons include:
|
||||
*/
|
||||
void setPassCount( int passCount ) throws CDIException;
|
||||
|
||||
/**
|
||||
* Adds the given actions to the action list of thie tracepoint.
|
||||
*
|
||||
* @param actions to add
|
||||
* @throws CDIException if this method fails. Reasons include:
|
||||
*/
|
||||
void addActions( ICDITracepoint.IAction[] actions ) throws CDIException;
|
||||
|
||||
/**
|
||||
* Removes the given actions from the action list of thie tracepoint.
|
||||
*
|
||||
* @param actions to remove
|
||||
* @throws CDIException if this method fails. Reasons include:
|
||||
*/
|
||||
void removeActions( ICDITracepoint.IAction[] actions ) throws CDIException;
|
||||
|
||||
/**
|
||||
* Clears the action list of thie tracepoint.
|
||||
*
|
||||
* @throws CDIException if this method fails. Reasons include:
|
||||
*/
|
||||
void clearActions() throws CDIException;
|
||||
|
||||
/**
|
||||
* Returns the actions assigned to this tracepoint.
|
||||
*
|
||||
* @return the actions of this tracepoint
|
||||
*/
|
||||
ICDITracepoint.IAction[] getActions();
|
||||
}
|
Loading…
Add table
Reference in a new issue