- added some missing bochsrc options in bx_write_configuration()
- moved debugger-specific stuff to a separate write function (TODO: debug symbols) - removed support for old-style syntax of the 'vgaromimage' bochsrc option
This commit is contained in:
parent
0a911dec81
commit
dc47d21f98
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: config.cc,v 1.179 2009-05-06 17:37:34 sshwarts Exp $
|
||||
// $Id: config.cc,v 1.180 2009-05-07 18:46:12 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -2561,8 +2561,7 @@ static int parse_line_formatted(const char *context, int num_params, char *param
|
||||
if (!strncmp(params[1], "file=", 5)) {
|
||||
SIM->get_param_string(BXPN_VGA_ROM_PATH)->set(¶ms[1][5]);
|
||||
} else {
|
||||
BX_INFO(("WARNING: syntax has changed, please use 'vgaromimage: file=...' now"));
|
||||
SIM->get_param_string(BXPN_VGA_ROM_PATH)->set(params[1]);
|
||||
PARSE_ERR(("%s: vgaromimage directive malformed.", context));
|
||||
}
|
||||
} else if (!strncmp(params[0], "optromimage", 11)) {
|
||||
int num = atoi(¶ms[0][11]);
|
||||
@ -3468,9 +3467,6 @@ int bx_write_log_options(FILE *fp, bx_list_c *base)
|
||||
{
|
||||
fprintf(fp, "log: %s\n", SIM->get_param_string("filename", base)->getptr());
|
||||
fprintf(fp, "logprefix: %s\n", SIM->get_param_string("prefix", base)->getptr());
|
||||
#if BX_DEBUGGER
|
||||
fprintf(fp, "debugger_log: %s\n", SIM->get_param_string("debugger_filename", base)->getptr());
|
||||
#endif
|
||||
fprintf(fp, "panic: action=%s\n",
|
||||
io->getaction(logfunctions::get_default_action(LOGLEV_PANIC)));
|
||||
fprintf(fp, "error: action=%s\n",
|
||||
@ -3496,6 +3492,23 @@ int bx_write_keyboard_options(FILE *fp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int bx_write_debugger_options(FILE *fp)
|
||||
{
|
||||
#if BX_DEBUGGER
|
||||
fprintf(fp, "debugger_log: %s\n", SIM->get_param_string("debugger_filename", base)->getptr());
|
||||
fprintf(fp, "magic_break: enabled=%d\n", bx_dbg.magic_break_enabled);
|
||||
// TODO: debug symbols
|
||||
#endif
|
||||
#if BX_GDBSTUB
|
||||
bx_list_c *base = (bx_list_c*) SIM->get_param(BXPN_GDBSTUB);
|
||||
fprintf(fp, "gdbstub: enabled=%d, port=%d, text_base=%d, data_base=%d, bss_base=%d\n",
|
||||
SIM->get_param_bool("enabled", base), SIM->get_param_num("port", base),
|
||||
SIM->get_param_bool("text_base", base), SIM->get_param_num("data_base", base),
|
||||
SIM->get_param_num("bss_base", base));
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
// return values:
|
||||
// 0: written ok
|
||||
// -1: failed
|
||||
@ -3526,6 +3539,15 @@ int bx_write_configuration(const char *rc, int overwrite)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
fprintf(fp, "plugin_ctrl: ");
|
||||
base = (bx_list_c*) SIM->get_param(BXPN_PLUGIN_CTRL);
|
||||
for (i=0; i<base->get_size(); i++) {
|
||||
if (i > 0) fprintf(fp, ", ");
|
||||
bx_param_bool_c *plugin = (bx_param_bool_c*)(base->get(i));
|
||||
fprintf(fp, "%s=%d", plugin->get_name(), plugin->get());
|
||||
}
|
||||
fprintf(fp, "\n");
|
||||
fprintf(fp, "config_interface: %s\n", SIM->get_param_enum(BXPN_SEL_CONFIG_INTERFACE)->get_selected());
|
||||
fprintf(fp, "display_library: %s", SIM->get_param_enum(BXPN_SEL_DISPLAY_LIBRARY)->get_selected());
|
||||
strptr = SIM->get_param_string(BXPN_DISPLAYLIB_OPTIONS)->getptr();
|
||||
@ -3638,12 +3660,10 @@ int bx_write_configuration(const char *rc, int overwrite)
|
||||
strptr = SIM->get_param_string(BXPN_CONFIGURABLE_MSRS_PATH)->getptr();
|
||||
if (strlen(strptr) > 0)
|
||||
fprintf(fp, ", msrs=\"%s\"", strptr);
|
||||
#endif
|
||||
#endif
|
||||
fprintf(fp, "\n");
|
||||
fprintf(fp, "print_timestamps: enabled=%d\n", bx_dbg.print_timestamps);
|
||||
#if BX_DEBUGGER
|
||||
fprintf(fp, "magic_break: enabled=%d\n", bx_dbg.magic_break_enabled);
|
||||
#endif
|
||||
bx_write_debugger_options(fp);
|
||||
fprintf(fp, "port_e9_hack: enabled=%d\n", SIM->get_param_bool(BXPN_PORT_E9_HACK)->get());
|
||||
fprintf(fp, "text_snapshot_check: enabled=%d\n", SIM->get_param_bool(BXPN_TEXT_SNAPSHOT_CHECK)->get());
|
||||
fprintf(fp, "private_colormap: enabled=%d\n", SIM->get_param_bool(BXPN_PRIVATE_COLORMAP)->get());
|
||||
|
Loading…
x
Reference in New Issue
Block a user