Interface Debugger

All Known Implementing Classes:
Debugger_std, GraphicalDebugger

public interface Debugger

This interface describes the services a debugger must offer.
You can read the source of this interface here.


Method Summary
 void Animate()
          Runs the PIC and display state after each instruction.
 void AssembleAndLoadSource()
          Assembles and loadsthe source code.
 void DisplayAll()
          Displays state, stacl, current instruction and file registers
 void DisplayBreakpoints()
          Displays the breakpoints.
 void DisplayFileRegisters()
          Displays the file registers.
 void DisplayFlash()
          Displays the flash.
 void DisplayInstruction()
          Displays the current instruction.
 void DisplayStack()
          Displays the stack.
 void DisplayState()
          Displays the state of the PIC.
 int GetBreakpoint(int n)
          Returns the nth breakpoint.
 int getLabelAddress(int index)
          Returns the address of the indexth label.
 int getPC()
          Returns the program counter of the PIC.
 PIC getPIC()
          Returns the PIC so that links to other DigitalComponent can be made.
 boolean IsBreakpoint(int n)
          Returns true if there is a breakpoint at address n.
 void LoadProgram(CompiledProgram prog)
          Loads a program into the PIC.
 void LoadProgram(java.lang.String fn)
          Loads a program into the PIC.
 void RefreshFlash(int n)
          Refreshes instruction n of the flash.
 void RemoveBreakpoint(int n)
          Removes the breakpoint at address n.
 void Run()
          Runs the PIC.
 boolean Running()
          Returns the running state of the PIC.
 void SaveProgram(java.lang.String filename)
          Saves the loaded program.
 void SaveSource(java.lang.String filename)
          Saves the source that's in the editor.
 void SetBreakpoint(int n)
          Sets a breakpoint to address n.
 void setPC(int n)
          Sets the program counter.
 void StepOver()
          Executes one instruction but steps over calls.
 void Stop()
          Stops the PIC.
 void Trace()
          Executes one instruction.
 void UpdateSource(java.lang.String s)
          Updates the source code.
 

Method Detail

getPIC

public PIC getPIC()
Returns the PIC so that links to other DigitalComponent can be made.

getLabelAddress

public int getLabelAddress(int index)
Returns the address of the indexth label.

Animate

public void Animate()
Runs the PIC and display state after each instruction.

Trace

public void Trace()
Executes one instruction.

StepOver

public void StepOver()
Executes one instruction but steps over calls.

Run

public void Run()
Runs the PIC.

Stop

public void Stop()
Stops the PIC.

Running

public boolean Running()
Returns the running state of the PIC.

LoadProgram

public void LoadProgram(java.lang.String fn)
Loads a program into the PIC.
Parameters:
fn - File name of the file containing the program to load.

LoadProgram

public void LoadProgram(CompiledProgram prog)
Loads a program into the PIC.
Parameters:
prog - CompiledProgram to load.

SaveProgram

public void SaveProgram(java.lang.String filename)
Saves the loaded program.
Parameters:
filename - Name of the file.

UpdateSource

public void UpdateSource(java.lang.String s)
Updates the source code.
Parameters:
s - New source code.

AssembleAndLoadSource

public void AssembleAndLoadSource()
Assembles and loadsthe source code.

SaveSource

public void SaveSource(java.lang.String filename)
Saves the source that's in the editor.
Parameters:
filename - Name of the file.

DisplayFileRegisters

public void DisplayFileRegisters()
Displays the file registers.

DisplayFlash

public void DisplayFlash()
Displays the flash.

DisplayState

public void DisplayState()
Displays the state of the PIC.

DisplayInstruction

public void DisplayInstruction()
Displays the current instruction.

DisplayStack

public void DisplayStack()
Displays the stack.

RefreshFlash

public void RefreshFlash(int n)
Refreshes instruction n of the flash.

DisplayAll

public void DisplayAll()
Displays state, stacl, current instruction and file registers

DisplayBreakpoints

public void DisplayBreakpoints()
Displays the breakpoints.

GetBreakpoint

public int GetBreakpoint(int n)
Returns the nth breakpoint.

SetBreakpoint

public void SetBreakpoint(int n)
Sets a breakpoint to address n.

IsBreakpoint

public boolean IsBreakpoint(int n)
Returns true if there is a breakpoint at address n.

RemoveBreakpoint

public void RemoveBreakpoint(int n)
Removes the breakpoint at address n.

getPC

public int getPC()
Returns the program counter of the PIC.

setPC

public void setPC(int n)
Sets the program counter.