From 879b84f0f16a441566015902ec34f102c058097b Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sat, 1 Sep 2001 00:19:50 +0000 Subject: new commands: pddir, sddir, ptime, psrc, pprog, pline --- mixlib/xmix_vm_command.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'mixlib/xmix_vm_command.h') diff --git a/mixlib/xmix_vm_command.h b/mixlib/xmix_vm_command.h index f83bf72..6a691ee 100644 --- a/mixlib/xmix_vm_command.h +++ b/mixlib/xmix_vm_command.h @@ -44,6 +44,7 @@ extern const gchar *TRACING_KEY_; extern const gchar *TIMING_KEY_; extern const gchar *EDITOR_KEY_; extern const gchar *ASM_KEY_; +extern const gchar *LOGGING_KEY_; /* hooks */ typedef struct @@ -59,7 +60,7 @@ typedef struct } global_hook_; -#define PRNO_ MIX_PRED_MEM +enum {PRNO_ = MIX_PRED_MEM, HOOKNO_ = MIX_CMD_INVALID}; struct mix_vm_cmd_dispatcher_t { @@ -79,14 +80,23 @@ struct mix_vm_cmd_dispatcher_t mix_time_t progtime; /* current program running time */ GHashTable *commands; /* local commands */ GCompletion *completions; /* command completion list */ - GSList *pre_hooks[MIX_CMD_INVALID]; /* Pre-command hooks */ - GSList *post_hooks[MIX_CMD_INVALID]; /* Post-command hooks */ - GSList *global_pre; /* global pre-command hook */ - GSList *global_post; /* global post-command hook */ + GSList *pre_hooks[HOOKNO_]; /* Pre-command hooks */ + GSList *post_hooks[HOOKNO_]; /* Post-command hooks */ + GSList *global_pre; /* global pre-command hook */ + GSList *global_post; /* global post-command hook */ mix_config_t *config; /* externally provided configuration */ mix_predicate_t *preds[PRNO_]; /* predicates for conditional breakpoints */ GHashTable *mem_preds; /* predicates for memory conditional bps */ + gboolean log_msg; /* message logging activation flag*/ }; +extern void +log_message_ (mix_vm_cmd_dispatcher_t *dis, const gchar *fmt, ...); + +extern void +log_error_ (mix_vm_cmd_dispatcher_t *dis, const gchar *fmt, ...); + +#define wants_logs_(dis) (dis)->log_msg + #endif /* XMIX_VM_COMMAND_H */ -- cgit v1.2.3