From e7f7c0e5d697ec0e46fe834e6c2de45045c21fba Mon Sep 17 00:00:00 2001 From: Bryce Denney Date: Thu, 21 Jun 2001 20:50:30 +0000 Subject: [PATCH] - allow --disable-control-panel to work again. Now it actually compiles and links in the control panel, but just doesn't call it up. --- bochs/.bochsrc | 2 +- bochs/bochs.h | 9 ++++++--- bochs/gui/control.cc | 6 +----- bochs/gui/siminterface.cc | 8 +------- bochs/main.cc | 8 ++------ 5 files changed, 11 insertions(+), 22 deletions(-) diff --git a/bochs/.bochsrc b/bochs/.bochsrc index 871f0a099..21df23155 100644 --- a/bochs/.bochsrc +++ b/bochs/.bochsrc @@ -141,7 +141,7 @@ log: bochsout.txt # cause bochs to become unstable. The panic is a "graceful exit," so # if you disable it you may get a spectacular disaster instead. #======================================================================= -panic: action=ask +panic: action=fatal error: action=report info: action=report debug: action=ignore diff --git a/bochs/bochs.h b/bochs/bochs.h index f042ec551..549268344 100644 --- a/bochs/bochs.h +++ b/bochs/bochs.h @@ -82,9 +82,7 @@ extern "C" { #include "debug/debug.h" #include "bxversion.h" -#if BX_USE_CONTROL_PANEL #include "gui/siminterface.h" -#endif // // some macros to interface the CPU and memory to external environment @@ -245,7 +243,12 @@ typedef class logfunctions { // values of onoff: 0=ignore, 1=report, 2=fatal #define ACT_IGNORE 0 #define ACT_REPORT 1 -#define ACT_ASK 2 +#if BX_USE_CONTROL_PANEL +# define ACT_ASK 2 +#else + // if control panel disabled, then map all ACT_ASK into ACT_FATAL. +# define ACT_ASK ACT_FATAL +#endif #define ACT_FATAL 3 #define N_ACT 4 int onoff[N_LOGLEV]; diff --git a/bochs/gui/control.cc b/bochs/gui/control.cc index f651aef28..49115d056 100644 --- a/bochs/gui/control.cc +++ b/bochs/gui/control.cc @@ -1,6 +1,6 @@ /* * gui/control.cc - * $Id: control.cc,v 1.29 2001-06-21 19:57:21 bdenney Exp $ + * $Id: control.cc,v 1.30 2001-06-21 20:50:30 bdenney Exp $ * * This is code for a text-mode control panel. Note that this file * does NOT include bochs.h. Instead, it does all of its contact with @@ -57,7 +57,6 @@ write a compiler! */ #include "config.h" -#if BX_USE_CONTROL_PANEL extern "C" { #include @@ -887,7 +886,4 @@ bx_list_c::text_ask (FILE *fpin, FILE *fpout) return 0; } - /////////////////////////////////////////////////////////// - -#endif diff --git a/bochs/gui/siminterface.cc b/bochs/gui/siminterface.cc index 008bc7fd7..7a4c0bab6 100644 --- a/bochs/gui/siminterface.cc +++ b/bochs/gui/siminterface.cc @@ -1,6 +1,6 @@ /* * gui/siminterface.cc - * $Id: siminterface.cc,v 1.28 2001-06-21 19:57:21 bdenney Exp $ + * $Id: siminterface.cc,v 1.29 2001-06-21 20:50:30 bdenney Exp $ * * Defines the actual link between bx_simulator_interface_c methods * and the simulator. This file includes bochs.h because it needs @@ -10,8 +10,6 @@ #include "bochs.h" -#if BX_USE_CONTROL_PANEL - bx_simulator_interface_c *SIM = NULL; logfunctions *siminterface_log = NULL; #define LOG_THIS siminterface_log-> @@ -545,7 +543,3 @@ bx_list_c::set_parent (bx_param_c *parent) { this->parent = parent; } - -#endif // if BX_USE_CONTROL_PANEL==1 - - diff --git a/bochs/main.cc b/bochs/main.cc index 7e17e32f2..4160def37 100644 --- a/bochs/main.cc +++ b/bochs/main.cc @@ -713,14 +713,12 @@ main(int argc, char *argv[]) bx_init_bx_dbg (); int read_rc_already = 0; -#if BX_USE_CONTROL_PANEL - // Display the pre-simulation control panel. init_siminterface (); bx_init_options (); +#if BX_USE_CONTROL_PANEL + // Display the pre-simulation control panel. if ((bx_control_panel (BX_CPANEL_START_MAIN)) != BX_DISABLE_CONTROL_PANEL) read_rc_already = 1; -#else - bx_init_options (); #endif if (!read_rc_already) { /* parse configuration file and command line arguments */ @@ -768,9 +766,7 @@ main(int argc, char *argv[]) bx_load32bitOSimagehack(); } -#if BX_USE_CONTROL_PANEL SIM->set_init_done (1); -#endif if (BX_SMP_PROCESSORS == 1) { // only one processor, run as fast as possible by not messing with