|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.runtime.PlatformObject
org.eclipse.debug.core.model.DebugElement
com.pvx.ooadide.launchers.debug.model.PVXDebugElement
com.pvx.ooadide.launchers.debug.model.PVXDebugTarget
public class PVXDebugTarget
PVX Debug Target
Field Summary | |
---|---|
static java.lang.String |
CHARSET
|
Constructor Summary | |
---|---|
PVXDebugTarget(org.eclipse.debug.core.ILaunch launch,
org.eclipse.debug.core.model.IProcess process)
Constructs a new debug target in the given launch for the associated PVX VM process. |
|
PVXDebugTarget(org.eclipse.debug.core.ILaunch launch,
org.eclipse.debug.core.model.IProcess process,
int requestPort,
int eventPort)
Constructs a new debug target in the given launch for the associated PVX VM process. |
|
PVXDebugTarget(org.eclipse.debug.core.ILaunch launch,
org.eclipse.debug.core.model.IProcess p,
java.lang.String iName)
|
Method Summary | |
---|---|
void |
addEventListener(IPVXEventListener listener)
Registers the given event listener. |
void |
breakpointAdded(org.eclipse.debug.core.model.IBreakpoint breakpoint)
|
void |
breakpointChanged(org.eclipse.debug.core.model.IBreakpoint breakpoint,
org.eclipse.core.resources.IMarkerDelta delta)
|
void |
breakpointManagerEnablementChanged(boolean enabled)
When the breakpoint manager disables, remove all registered breakpoints requests from the VM. |
void |
breakpointRemoved(org.eclipse.debug.core.model.IBreakpoint breakpoint,
org.eclipse.core.resources.IMarkerDelta delta)
|
boolean |
canDisconnect()
|
boolean |
canPop()
Returns whether popping the data stack is currently permitted |
boolean |
canPush()
Returns whether pushing a value is currently supported. |
boolean |
canResume()
|
boolean |
canSuspend()
|
boolean |
canTerminate()
|
boolean |
connectToInterpreter(int requestPort,
int eventPort)
|
void |
disconnect()
|
org.eclipse.debug.core.model.IValue[] |
getDataStack()
Returns the values on the data stack (top down) |
org.eclipse.debug.core.model.IDebugTarget |
getDebugTarget()
|
org.eclipse.debug.core.ILaunch |
getLaunch()
|
org.eclipse.debug.core.model.IMemoryBlock |
getMemoryBlock(long startAddress,
long length)
|
java.lang.String |
getName()
|
org.eclipse.debug.core.model.IProcess |
getProcess()
|
org.eclipse.debug.core.model.IThread[] |
getThreads()
|
void |
handleEvent(java.lang.String event)
Notification the given event occurred in the target program being interpretted. |
boolean |
hasThreads()
|
boolean |
isDisconnected()
|
boolean |
isSuspended()
|
boolean |
isTerminated()
|
void |
logAvailableData()
|
void |
pauseExecution(int milliS)
|
org.eclipse.debug.core.model.IValue |
pop()
Pops and returns the top of the data stack |
void |
push(java.lang.String value)
Pushes a value onto the stack. |
void |
removeEventListener(IPVXEventListener listener)
Deregisters the given event listener. |
void |
resume()
|
java.lang.String |
sendRequest(java.lang.String request)
Sends a request to the PDA interprettor, waits for and returns the reply. |
void |
startDebugSession(java.net.Socket requestSocket,
java.net.Socket eventSocket)
|
boolean |
supportsBreakpoint(org.eclipse.debug.core.model.IBreakpoint breakpoint)
|
boolean |
supportsStorageRetrieval()
|
void |
suspend()
|
void |
terminate()
|
Methods inherited from class com.pvx.ooadide.launchers.debug.model.PVXDebugElement |
---|
getModelIdentifier |
Methods inherited from class org.eclipse.debug.core.model.DebugElement |
---|
fireChangeEvent, fireCreationEvent, fireEvent, fireResumeEvent, fireSuspendEvent, fireTerminateEvent, getAdapter |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.debug.core.model.IDebugElement |
---|
getModelIdentifier |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
---|
getAdapter |
Field Detail |
---|
public static final java.lang.String CHARSET
Constructor Detail |
---|
public PVXDebugTarget(org.eclipse.debug.core.ILaunch launch, org.eclipse.debug.core.model.IProcess process, int requestPort, int eventPort) throws org.eclipse.core.runtime.CoreException
launch
- containing launchprocess
- PVX VMrequestPort
- port to send requests to the VMeventPort
- port to read events from
org.eclipse.core.runtime.CoreException
- if unable to connect to hostpublic PVXDebugTarget(org.eclipse.debug.core.ILaunch launch, org.eclipse.debug.core.model.IProcess process) throws org.eclipse.core.runtime.CoreException
launch
- containing launchprocess
- PVX VMrequestPort
- port to send requests to the VMeventPort
- port to read events from
org.eclipse.core.runtime.CoreException
- if unable to connect to hostpublic PVXDebugTarget(org.eclipse.debug.core.ILaunch launch, org.eclipse.debug.core.model.IProcess p, java.lang.String iName) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
Method Detail |
---|
public void addEventListener(IPVXEventListener listener)
listener
- event listenerpublic void removeEventListener(IPVXEventListener listener)
listener
- event listenerpublic void startDebugSession(java.net.Socket requestSocket, java.net.Socket eventSocket)
public void pauseExecution(int milliS)
public boolean connectToInterpreter(int requestPort, int eventPort) throws org.eclipse.debug.core.DebugException
org.eclipse.debug.core.DebugException
public org.eclipse.debug.core.model.IProcess getProcess()
getProcess
in interface org.eclipse.debug.core.model.IDebugTarget
public org.eclipse.debug.core.model.IThread[] getThreads() throws org.eclipse.debug.core.DebugException
getThreads
in interface org.eclipse.debug.core.model.IDebugTarget
org.eclipse.debug.core.DebugException
public boolean hasThreads() throws org.eclipse.debug.core.DebugException
hasThreads
in interface org.eclipse.debug.core.model.IDebugTarget
org.eclipse.debug.core.DebugException
public java.lang.String getName() throws org.eclipse.debug.core.DebugException
getName
in interface org.eclipse.debug.core.model.IDebugTarget
org.eclipse.debug.core.DebugException
public boolean supportsBreakpoint(org.eclipse.debug.core.model.IBreakpoint breakpoint)
supportsBreakpoint
in interface org.eclipse.debug.core.model.IDebugTarget
public org.eclipse.debug.core.model.IDebugTarget getDebugTarget()
getDebugTarget
in interface org.eclipse.debug.core.model.IDebugElement
getDebugTarget
in class org.eclipse.debug.core.model.DebugElement
public org.eclipse.debug.core.ILaunch getLaunch()
getLaunch
in interface org.eclipse.debug.core.model.IDebugElement
getLaunch
in class org.eclipse.debug.core.model.DebugElement
public boolean canTerminate()
canTerminate
in interface org.eclipse.debug.core.model.ITerminate
public boolean isTerminated()
isTerminated
in interface org.eclipse.debug.core.model.ITerminate
public void terminate() throws org.eclipse.debug.core.DebugException
terminate
in interface org.eclipse.debug.core.model.ITerminate
org.eclipse.debug.core.DebugException
public boolean canResume()
canResume
in interface org.eclipse.debug.core.model.ISuspendResume
public boolean canSuspend()
canSuspend
in interface org.eclipse.debug.core.model.ISuspendResume
public boolean isSuspended()
isSuspended
in interface org.eclipse.debug.core.model.ISuspendResume
public void resume() throws org.eclipse.debug.core.DebugException
resume
in interface org.eclipse.debug.core.model.ISuspendResume
org.eclipse.debug.core.DebugException
public void suspend() throws org.eclipse.debug.core.DebugException
suspend
in interface org.eclipse.debug.core.model.ISuspendResume
org.eclipse.debug.core.DebugException
public void breakpointAdded(org.eclipse.debug.core.model.IBreakpoint breakpoint)
breakpointAdded
in interface org.eclipse.debug.core.IBreakpointListener
public void breakpointRemoved(org.eclipse.debug.core.model.IBreakpoint breakpoint, org.eclipse.core.resources.IMarkerDelta delta)
breakpointRemoved
in interface org.eclipse.debug.core.IBreakpointListener
public void breakpointChanged(org.eclipse.debug.core.model.IBreakpoint breakpoint, org.eclipse.core.resources.IMarkerDelta delta)
breakpointChanged
in interface org.eclipse.debug.core.IBreakpointListener
public boolean canDisconnect()
canDisconnect
in interface org.eclipse.debug.core.model.IDisconnect
public void disconnect() throws org.eclipse.debug.core.DebugException
disconnect
in interface org.eclipse.debug.core.model.IDisconnect
org.eclipse.debug.core.DebugException
public boolean isDisconnected()
isDisconnected
in interface org.eclipse.debug.core.model.IDisconnect
public boolean supportsStorageRetrieval()
supportsStorageRetrieval
in interface org.eclipse.debug.core.model.IMemoryBlockRetrieval
public org.eclipse.debug.core.model.IMemoryBlock getMemoryBlock(long startAddress, long length) throws org.eclipse.debug.core.DebugException
getMemoryBlock
in interface org.eclipse.debug.core.model.IMemoryBlockRetrieval
org.eclipse.debug.core.DebugException
public org.eclipse.debug.core.model.IValue[] getDataStack() throws org.eclipse.debug.core.DebugException
org.eclipse.debug.core.DebugException
public void logAvailableData() throws java.io.IOException
java.io.IOException
public java.lang.String sendRequest(java.lang.String request) throws org.eclipse.debug.core.DebugException
PVXDebugElement
Interprettor commands and replies are as follows:
clear N
- clear the breakpoint on line N
;
reply is ok
data
- return the contents of the data stack; reply is the data
from oldest to newest as a single string "value|value|value|...|value|"
drop
- pops the top stack frame off the call stack setting the
instruction pointer to the calling statement in the calling frameeventstop E B
- optionally stop the interpreter when an error event
E
is encountered; B
specifies stop (1
) or
continue (0
). The possible events are unimpinstr
and
nosuchlabel
. Reply is ok
. When an event is encountered,
the interprettor sends the error event (for example unimlpemented instruction foo
)
and corresponding suspend event (for example suspended event unimpinstr
).exit
- end the interpretter; reply is ok
popdata
- pop the top value off the data stack; reply is the valuepushdata V
- push the value V
onto the data stack; reply is
ok
resume
- resume execution of the program; reply is ok
set N
- set a line breakpoint on line N
(lines are indexed
from 0); reply is ok
setdata N V
- set the contents of data stack element N
to
value V
(the data stack is indexed from 0, 0 being the oldest); reply
is ok
setvar N M V
- set the contents of variable M
from the control
stack N
to value V
(the control stack is indexed from 0,
0 being the oldest); reply is ok
stack
- return the contents of the control stack (program counters, function and
variable names); reply is control stack from oldest to newest as a single string
frame#frame#frame...#frame
where each frame is a string
"filename|pc|function name|variable name|variable name|...|variable name"
step
- single step forward; reply is ok
stepreturn
- single step forward until the next return
op code;
stop before executing the return
; reply is ok
suspend
- suspend execution of the program and listen for debug comands;
reply is ok
watch F::V M
- set a watchpoint on variable V
in function
F
to magic value M
; the magic value is a bit flag corresponding
to read access (1), write access (2), or both (3); the magic value 0 clears the watchpoint;
reply is ok
var N M
- return the contents of variable M
in the control
stack frame N
(stack frames are indexed from 0, 0 being the oldest);
reply is variable value
sendRequest
in class PVXDebugElement
request
- command
org.eclipse.debug.core.DebugException
- if the request failspublic void breakpointManagerEnablementChanged(boolean enabled)
breakpointManagerEnablementChanged
in interface org.eclipse.debug.core.IBreakpointManagerListener
public boolean canPop()
public org.eclipse.debug.core.model.IValue pop() throws org.eclipse.debug.core.DebugException
org.eclipse.debug.core.DebugException
- if the stack is empty or the request failspublic boolean canPush()
public void push(java.lang.String value) throws org.eclipse.debug.core.DebugException
value
- value to push
org.eclipse.debug.core.DebugException
- on failurepublic void handleEvent(java.lang.String event)
IPVXEventListener
handleEvent
in interface IPVXEventListener
event
- the event
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |