NCurses
[Debugger]


Data Structures

struct  _window_t
struct  command_t

Defines

#define ST_W   ((getmaxx(stdscr)-1)/5)
#define ST_H   ((getmaxy(stdscr)-1)/3)
#define STATE_IDLE   0
#define STATE_RUNNING   1
#define STATE_STEPPING   2
#define STATE_DEAD   3

Typedefs

typedef struct
_window_t
window_t

Enumerations

enum  {
  CodeWin = 0, DataSeg, DataStack, LocalsStack,
  ClosureStack, CallStack, CatchStack, StdOutWin,
  StdErrWin, N_WINDOWS
}

Functions

void create_window (window_t ww, void(*r)(WINDOW *, int, vm_t, thread_t), int x, int y, int W, int H)
void destroy_window (window_t ww)
void print_centered (WINDOW *w, int is_cur, int y, const char *str)
void render_win (window_t w, const char *title, vm_t vm, thread_t t)
void do_scroll_down ()
void do_scroll_up ()
void do_step ()
void do_run ()
void do_cycle_win ()
void term ()
void do_quit ()
void do_help ()
void read_command (vm_t vm, thread_t t)
word_t calc_count (int n, word_t sz)
static void repaint (vm_t vm, thread_t t, int do_command)
void render_code (WINDOW *w, int vofs, vm_t vm, thread_t t)
void render_callstack (WINDOW *w, int vofs, vm_t vm, thread_t t)
void render_catchstack (WINDOW *w, int vofs, vm_t vm, thread_t t)
void render_datastack (WINDOW *w, int vofs, vm_t vm, thread_t t)
void render_localsstack (WINDOW *w, int vofs, vm_t vm, thread_t t)
void render_closurestack (WINDOW *w, int vofs, vm_t vm, thread_t t)
void render_dataseg (WINDOW *w, int vofs, vm_t vm, thread_t t)
void render_stdout (WINDOW *w, int vofs, vm_t vm, thread_t t)
void render_stderr (WINDOW *w, int vofs, vm_t vm, thread_t t)
void init ()

Variables

struct _window_t windows [N_WINDOWS]
int cur_win = 0
int state = STATE_IDLE
command_t commands_all []
command_t commands [N_WINDOWS][32]
vm_t vm
const vm_engine_t debug_engine


Define Documentation

#define ST_W   ((getmaxx(stdscr)-1)/5)

#define ST_H   ((getmaxy(stdscr)-1)/3)

#define STATE_IDLE   0

#define STATE_RUNNING   1

#define STATE_STEPPING   2

#define STATE_DEAD   3


Typedef Documentation

typedef struct _window_t* window_t


Enumeration Type Documentation

anonymous enum

Enumerator:
CodeWin 
DataSeg 
DataStack 
LocalsStack 
ClosureStack 
CallStack 
CatchStack 
StdOutWin 
StdErrWin 
N_WINDOWS 


Function Documentation

void create_window ( window_t  ww,
void(*)(WINDOW *, int, vm_t, thread_t r,
int  x,
int  y,
int  W,
int  H 
)

void destroy_window ( window_t  ww  ) 

void print_centered ( WINDOW *  w,
int  is_cur,
int  y,
const char *  str 
)

void render_win ( window_t  w,
const char *  title,
vm_t  vm,
thread_t  t 
)

void do_scroll_down (  ) 

void do_scroll_up (  ) 

void do_step (  ) 

void do_run (  ) 

void do_cycle_win (  ) 

void term (  ) 

void do_quit (  ) 

void do_help (  ) 

void read_command ( vm_t  vm,
thread_t  t 
)

word_t calc_count ( int  n,
word_t  sz 
)

static void repaint ( vm_t  vm,
thread_t  t,
int  do_command 
) [static]

void render_code ( WINDOW *  w,
int  vofs,
vm_t  vm,
thread_t  t 
)

void render_callstack ( WINDOW *  w,
int  vofs,
vm_t  vm,
thread_t  t 
)

void render_catchstack ( WINDOW *  w,
int  vofs,
vm_t  vm,
thread_t  t 
)

void render_datastack ( WINDOW *  w,
int  vofs,
vm_t  vm,
thread_t  t 
)

void render_localsstack ( WINDOW *  w,
int  vofs,
vm_t  vm,
thread_t  t 
)

void render_closurestack ( WINDOW *  w,
int  vofs,
vm_t  vm,
thread_t  t 
)

void render_dataseg ( WINDOW *  w,
int  vofs,
vm_t  vm,
thread_t  t 
)

void render_stdout ( WINDOW *  w,
int  vofs,
vm_t  vm,
thread_t  t 
)

void render_stderr ( WINDOW *  w,
int  vofs,
vm_t  vm,
thread_t  t 
)

void init (  ) 


Variable Documentation

struct _window_t windows[N_WINDOWS]

int cur_win = 0

int state = STATE_IDLE

command_t commands_all[]

Initial value:

 {
        { 'h', "display this popup", do_help },
        { KEY_DOWN, "scroll down by one line", do_scroll_down },
        { KEY_UP, "scroll up by one line", do_scroll_up },
        { 'm', "scroll down by one line", do_scroll_down },
        { 'p', "scroll up by one line", do_scroll_up },
        { '\t', "cycle through windows", do_cycle_win },
        { 'q', "quit", do_quit },
}

command_t commands[N_WINDOWS][32]

Initial value:

 {
 {
        { 's', "execute next opcode", do_step },
        { 'r', "run this thread", do_run },
{ 0, NULL, NULL}},  {
{ 0, NULL, NULL}},  {
{ 0, NULL, NULL}},  {
{ 0, NULL, NULL}},  {
{ 0, NULL, NULL}},  {
{ 0, NULL, NULL}},  {
{ 0, NULL, NULL}},  {
{ 0, NULL, NULL}},  {
{ 0, NULL, NULL},
}}

vm_t vm

const vm_engine_t debug_engine


Generated on Wed Feb 6 14:46:05 2008 for TinyaML by  doxygen 1.5.3