From 114a59d1ad0ee6b02930db80c806d57abd81f6f0 Mon Sep 17 00:00:00 2001 From: Stanislav Shwartsman Date: Sat, 18 Oct 2008 17:12:37 +0000 Subject: [PATCH] - Added ability to choose Bochs log file name and Bochs debugger log file name from Bochs command line (using new -log and -dbglog options) --- bochs/CHANGES | 4 ++++ bochs/main.cc | 14 +++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/bochs/CHANGES b/bochs/CHANGES index d80c19094..ba45853ed 100644 --- a/bochs/CHANGES +++ b/bochs/CHANGES @@ -17,6 +17,8 @@ Detailed change log : (patch from @SF by Doug Reed). - Removed Peter Tattam's closed source external debugger interface from the code. + - Added ability to choose Bochs log file name and Bochs debugger log file + name from Bochs command line (using new -log and -dbglog options) - I/O Devices - Hard drive / cdrom @@ -63,6 +65,8 @@ Detailed change log : [1981505] Init PIIX4 PCI to ISA bridge and IDE by Sebastian - these S.F. bugs were closed + [2162824] latest cvs fails to compile + [2164506] latest bochs fails to start [2106514] RIS / startrom.com install ALMOST works [2123358] SMP (HTT): wbinvd executed by CPU1 crashes CPU0 [2029758] BEV can return via retf instead of int 18h diff --git a/bochs/main.cc b/bochs/main.cc index b490f0ba1..1f3da09cc 100644 --- a/bochs/main.cc +++ b/bochs/main.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: main.cc,v 1.383 2008-10-01 11:36:04 akrisak Exp $ +// $Id: main.cc,v 1.384 2008-10-18 17:12:37 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2002 MandrakeSoft S.A. @@ -493,8 +493,10 @@ void print_usage(void) " -q quick start (skip configuration interface)\n" " -benchmark n run bochs in benchmark mode for millions of emulated ticks\n" " -r path restore the Bochs state from path\n" + " -log filename specify Bochs log file name\n" #if BX_DEBUGGER " -rc filename execute debugger commands stored in file\n" + " -dbglog filename specify Bochs internal debugger log file name\n" #endif " --help display this help and exit\n\n" "For information on Bochs configuration file arguments, see the\n" @@ -545,6 +547,16 @@ int bx_init_main(int argc, char *argv[]) else if (!strcmp("-q", argv[arg])) { SIM->get_param_enum(BXPN_BOCHS_START)->set(BX_QUICK_START); } + else if (!strcmp("-log", argv[arg])) { + if (++arg >= argc) BX_PANIC(("-log must be followed by a filename")); + else SIM->get_param_string(BXPN_LOG_FILENAME)->set(argv[arg]); + } +#if BX_DEBUGGER + else if (!strcmp("-dbglog", argv[arg])) { + if (++arg >= argc) BX_PANIC(("-dbglog must be followed by a filename")); + else SIM->get_param_string(BXPN_DEBUGGER_LOG_FILENAME)->set(argv[arg]); + } +#endif else if (!strcmp("-f", argv[arg])) { if (++arg >= argc) BX_PANIC(("-f must be followed by a filename")); else bochsrc_filename = argv[arg];