|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.github.croesch.micro_debug.console.Mic1Interpreter
public final class Mic1Interpreter
Interpreter of a processor, can access and manipulate the processor.
| Constructor Summary | |
|---|---|
Mic1Interpreter(Mic1 mic)
Constructs an interpreter for the given processor. |
|
| Method Summary | |
|---|---|
void |
addMacroBreakpoint(Integer line)
Adds a breakpoint for the given line number in the macro code. |
void |
addMicroBreakpoint(Integer line)
Adds a breakpoint for the given line number in the micro code. |
void |
addRegisterBreakpoint(Register r,
Integer value)
Adds a breakpoint for the given Register and the given value. |
boolean |
canContinue(int microLine,
int macroLine)
Returns whether the processor should halt now or if it can continue. |
Mic1 |
getProcessor()
Returns the processor that this is interpreting. |
boolean |
isTracing(Register r)
Returns whether the given Register is currently traced. |
void |
listAllRegisters()
Lists the values of all Registers. |
void |
listBreakpoints()
Lists all breakpoints. |
void |
listSingleRegister(Register r)
Lists the value of a single Register. |
void |
printContent(int pos1,
int pos2)
Prints the content of the memory between the given addresses. |
void |
printMacroCode()
Prints the whole ijvm code to the user. |
void |
printMacroCode(int scope)
Prints the given number of lines of code around the current line to the user. |
void |
printMacroCode(int from,
int to)
Prints the whole ijvm code to the user. |
void |
printMicroCode()
Prints the whole micro code to the user. |
void |
printMicroCode(int scope)
Prints the given number of lines of micro code around the current line to the user. |
void |
printMicroCode(int from,
int to)
Prints the micro code to the user. |
void |
printStack(int elementsToHide)
Prints the content of the stack. |
void |
removeBreakpoint(int id)
Removes the breakpoint with the given unique id. |
void |
tickDone(MicroInstruction instruction,
boolean macroCodeFetching)
Informs the interpreter that the processor has done one tick. |
void |
traceLocalVariable(int num)
Performs to trace the local variable with the given number. |
void |
traceMacro()
Performs to trace the macro code. |
void |
traceMicro()
Performs to trace the micro code. |
void |
traceRegister()
Performs to trace all Registers. |
void |
traceRegister(Register r)
Performs to trace the given Register. |
void |
untraceLocalVariable(int num)
Performs to not trace the local variable with the given number. |
void |
untraceMacro()
Performs to not trace the macro code. |
void |
untraceMicro()
Performs to not trace the micro code. |
void |
untraceRegister()
Performs to not trace any Register. |
void |
untraceRegister(Register r)
Performs to not trace the given Register anymore. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Mic1Interpreter(Mic1 mic)
mic - the processor to interprete| Method Detail |
|---|
public void addRegisterBreakpoint(Register r,
Integer value)
Register and the given value. Debugger will break, if the given
Register has the given value.
r - the Register to watch for the given valuevalue - the value that should be a break point if the given Register has it.public void addMicroBreakpoint(Integer line)
line - the line number in micro code the debugger should break atpublic void addMacroBreakpoint(Integer line)
line - the line number in macro code the debugger should break atpublic void removeBreakpoint(int id)
id - the unique id of the breakpoint to removepublic void listBreakpoints()
public void listAllRegisters()
Registers.
public void listSingleRegister(Register r)
Register.
r - the Register to print with its value.public void traceLocalVariable(int num)
num - the number of the local variable in the given macro code method as an offset to the LV.public void traceMacro()
public void untraceMacro()
public void traceMicro()
public void traceRegister()
Registers.
public void traceRegister(Register r)
Register.
r - the Register to trace.public void untraceLocalVariable(int num)
num - the number of the local variable in the given macro code method as an offset to the LV.public void untraceMicro()
public void untraceRegister()
Register.
public void untraceRegister(Register r)
Register anymore.
r - the Register not being traced anymore.public boolean isTracing(Register r)
Register is currently traced.
r - the Register to check, if it's traced
true, if the Register is currently tracedfalse otherwise.public void printMacroCode()
public void printMacroCode(int scope)
scope - the number of lines to print before and after the current line
public void printMacroCode(int from,
int to)
from - the first line to printto - the last line to print
public void printContent(int pos1,
int pos2)
pos1 - the address to start (inclusive)pos2 - the address to end (inclusive)public void printStack(int elementsToHide)
elementsToHide - the number of elements to hide. The first possible element is the one the initial stack
pointer points to.
public boolean canContinue(int microLine,
int macroLine)
canContinue in interface IProcessorInterpretermicroLine - the number of the line in micro code being executed nextmacroLine - the number of the line in macro code being executed next
true if the processor can continue executing instructions,false otherwise
public void tickDone(MicroInstruction instruction,
boolean macroCodeFetching)
tickDone in interface IProcessorInterpreterinstruction - the executed micro instructionmacroCodeFetching - true if the next macro code instruction has being fetched,false otherwisepublic Mic1 getProcessor()
public void printMicroCode()
public void printMicroCode(int scope)
scope - the number of lines to print before and after the current line
public void printMicroCode(int from,
int to)
from - the first line to printto - the last line to print
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||