diff options
| author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2001-09-16 22:29:30 +0000 | 
|---|---|---|
| committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2001-09-16 22:29:30 +0000 | 
| commit | 43a57d59fd68d942365d40bfaee997637149e40c (patch) | |
| tree | 95c02502aa6390c0172be7d651f4f6714e954d16 /mixlib/mix_vm.h | |
| parent | eaa8d1f7813437d6b1bc55de786f34e9a92433c8 (diff) | |
| download | mdk-43a57d59fd68d942365d40bfaee997637149e40c.tar.gz mdk-43a57d59fd68d942365d40bfaee997637149e40c.tar.bz2 | |
maintain virtual machine status
Diffstat (limited to 'mixlib/mix_vm.h')
| -rw-r--r-- | mixlib/mix_vm.h | 31 | 
1 files changed, 21 insertions, 10 deletions
| diff --git a/mixlib/mix_vm.h b/mixlib/mix_vm.h index d3f4e3f..b7412bf 100644 --- a/mixlib/mix_vm.h +++ b/mixlib/mix_vm.h @@ -153,25 +153,33 @@ mix_vm_get_lineno_address (const mix_vm_t *vm, guint lineno);  /* continue execution of instructions in memory */  /* Possible outcomes */ -enum { -  MIX_VM_ERROR,		/* error executing instructions */ -  MIX_VM_BREAK,		/* breakpoint found */ -  MIX_VM_COND_BREAK,    /* conditional breakpoint found */ -  MIX_VM_HALT,		/* end of execution */ -  MIX_VM_OK		/* successful instruction execution */ -}; - -extern int +typedef enum { +  MIX_VM_ERROR,			/* error executing instructions */ +  MIX_VM_BREAK,			/* breakpoint found */ +  MIX_VM_COND_BREAK,		/* conditional breakpoint found */ +  MIX_VM_HALT,			/* end of execution */ +  MIX_VM_RUNNING,		/* successful instruction execution */ +  MIX_VM_LOADED,		/* program loaded */ +  MIX_VM_EMPTY			/* no program loaded */ +} mix_vm_status_t; + +/* run until next breakpoint or end of execution */ +extern mix_vm_status_t  mix_vm_run (mix_vm_t *vm);  /* execute next memory instruction */ -extern int +extern mix_vm_status_t  mix_vm_exec_next (mix_vm_t *vm); +/* get the current execution status */ +extern mix_vm_status_t +mix_vm_get_run_status (const mix_vm_t *vm); +  /* get the line no. of the last break or 0 if not found */  extern gulong  mix_vm_get_break_lineno (const mix_vm_t *vm); +  /* Breakpoints */  /* possible error outcomes */  enum { @@ -210,6 +218,9 @@ mix_vm_clear_conditional_breakpoint (mix_vm_t *vm, mix_predicate_t *pred);  extern const gchar *  mix_vm_get_last_breakpoint_message (const mix_vm_t *vm); +extern mix_predicate_type_t +mix_vm_get_last_conditional_breakpoint_type (const mix_vm_t *vm); +  /* Get the vm uptime, defined as the time spent executing instructions */  extern mix_time_t  mix_vm_get_uptime (const mix_vm_t *vm); | 
