diff options
Diffstat (limited to 'mixlib/xmix_vm_command.h')
| -rw-r--r-- | mixlib/xmix_vm_command.h | 20 | 
1 files changed, 15 insertions, 5 deletions
| 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 */ | 
