summaryrefslogtreecommitdiffhomepage
path: root/mixlib/mix_vm_command.c
diff options
context:
space:
mode:
Diffstat (limited to 'mixlib/mix_vm_command.c')
-rw-r--r--mixlib/mix_vm_command.c32
1 files changed, 29 insertions, 3 deletions
diff --git a/mixlib/mix_vm_command.c b/mixlib/mix_vm_command.c
index 07496c0..2b2819e 100644
--- a/mixlib/mix_vm_command.c
+++ b/mixlib/mix_vm_command.c
@@ -121,6 +121,7 @@ mix_vm_cmd_dispatcher_new (FILE *out_fd, /* output messages file */
result->result = TRUE;
result->out = out_fd;
result->err = err_fd;
+ result->log_msg = TRUE;
result->uptime = result->laptime = result->progtime = 0;
result->printtime = TRUE;
result->trace = FALSE;
@@ -157,22 +158,24 @@ mix_vm_cmd_dispatcher_new_with_config (FILE *out, FILE *err,
{
gint hsize = 0;
const gchar *val = mix_config_get (result->config, TRACING_KEY_);
- if (val) cmd_tracing_ (result, val);
+ if (val) cmd_strace_ (result, val);
val = mix_config_get (result->config, EDITOR_KEY_);
if (val) mix_vm_cmd_dispatcher_set_editor (result, val);
val = mix_config_get (result->config, ASM_KEY_);
if (val) mix_vm_cmd_dispatcher_set_assembler (result, val);
val = mix_config_get (result->config, TIMING_KEY_);
- if (val) cmd_timing_ (result, val);
+ if (val) cmd_stime_ (result, val);
val = mix_config_get_devices_dir (result->config);
if (!val || !mix_stat_dir (val, "devices"))
{
gchar *dirname = g_dirname (mix_config_get_filename (config));
- cmd_devdir_ (result, dirname);
+ cmd_sddir_ (result, dirname);
g_free (dirname);
}
else
mix_device_set_dir (val);
+ val = mix_config_get (result->config, LOGGING_KEY_);
+ if (val) cmd_slog_ (result, val);
#ifdef HAVE_LIBHISTORY
val = mix_config_get_history_file (result->config);
hsize = mix_config_get_history_size (result->config);
@@ -603,3 +606,26 @@ mix_vm_cmd_dispatcher_get_vm (const mix_vm_cmd_dispatcher_t *dis)
return dis->vm;
}
+/* src file info */
+gulong
+mix_vm_cmd_dispatcher_get_src_file_lineno (const mix_vm_cmd_dispatcher_t *dis)
+{
+ g_return_val_if_fail (dis != NULL, 0);
+ return mix_vm_get_break_lineno (dis->vm);
+}
+
+const gchar *
+mix_vm_cmd_dispatcher_get_src_file_line (const mix_vm_cmd_dispatcher_t *dis,
+ gulong line)
+{
+ const mix_src_file_t *file;
+ g_return_val_if_fail (dis != NULL, NULL);
+
+ file = mix_vm_get_src_file (dis->vm);
+
+ if (line == 0 || file == NULL) return "";
+
+ return mix_src_file_get_line (file, line);
+}
+
+