Commit Graph

15 Commits

Author SHA1 Message Date
Bryce Denney
690adc16bf - apply patch from Alexander Krisak (darkelf@newmail.ru)
which adds a help command to the debugger
- modified: debug/dbg_main.cc debug/debug.h debug/lexer.c debug/lexer.l
  debug/parser.c debug/parser.h debug/parser.y docs-html/debugger.html
- removed the patch file now that the changes are committed
2002-10-04 14:57:36 +00:00
Bryce Denney
bbae3335a2 - add Debug Log dialog, which shows all the text output that is normally
printed to stderr in the text debugger.  Also allows the user to
  type (text) debugger commands directly, which also appear in the log.
- all text output in the debugger now passes through dbg_printf()
  (used to be fprintf to stderr) so that in wxWindows I can redirect
  it all to the wxWindows debug log screen.  Added debug_fputs to
  siminterface which actually sends the text to the GUI by creating
  a BX_ASYNC_EVT_DBG_MSG event.
- changed prefix and msg fields of BxLogMsgEvent to const char *,
  and also in args of logmsg method of siminterface.
- don't trap SIGINT in wxWindows.  There are other ways to stop execution.
  Also, signal handling with multiple threads is very strange and different
  on different platforms.
- minor changes to fix gcc -Wall warnings in dbg_main.cc
- add a new boolean parameter BXP_DEBUG_RUNNING that tells if the debugger is
  running freely or not.  This is used by the wxWindows GUI to enable or
  disable certain choices.
- CpuRegistersDialog has continue,stop,step buttons.  When the sim is running
  freely, I disable continue and step, and enable stop.  When the sim stops
  to wait for the user, I disable stop and enable continue and step.  The
  change of enables used to be triggered by actually pressing the button,
  but then if you started/stopped the simulation in some other way (typing
  in debug log window) the enables were never changed.  Now the enables are
  controlled by the value of BXP_DEBUG_RUNNING, which is set by the debug code
  itself, and the buttons are enabled at the right time.
- ParamDialog::Refresh() is now virtual so that child classes can redefine
  its refresh behavior.
- in safeWxStrcpy, force the last element of the array to be a 0, since
  I noticed that strncpy is not guaranteed to terminate the string!
- modified: debug/dbg_main.cc debug/debug.h gui/siminterface.cc
  gui/siminterface.h gui/wxdialog.cc gui/wxdialog.h gui/wxmain.cc
  gui/wxmain.h
2002-09-15 11:21:35 +00:00
Kevin Lawton
93d05990cc Updated CR4 to use the patented Bryce bitfields accessor method for
both cpu32 and cpu64, to make upcoming merging easier, and the
code cleaner.  Compiled for debug as well, and fixed CR4 for that
also.
2002-09-14 19:21:41 +00:00
Bryce Denney
565b3846c9 - add infrastructure for sending commands from the wxWindows interface to the
Bochs debugger.  The Bochs debugger calls SIM->debug_get_next_command() which
  does not return until a debugger command is found.  The siminterface sends an
  synchronous event to the wxWindows thread with a blank to be filled in with a
  debugger command.  wxWindows fills in the blank and sends the synchronous
  event back, and the Bochs debugger interprets it as if it was typed on
  the command line.  For the long term I haven't decided whether to stick with
  sending text strings vs. some other method.
- so far the wxWindows debugger consists of one big dialog box that shows
  all the standard registers, and a working Continue, Stop, and Step button.
- modify ParamDialog so that it is more useful as a base class, by moving
  some things to protected members&fields, separating out functionality
  that is most likely to be replaced into virtual functions, and making it
  generally more flexible.  The new CpuRegistersDialog is based on
  ParamDialog.
- in wxdialog.cc, continue the convention of using wxID_HELP, wxID_OK,
  wxID_CANCEL, etc. for the id's of buttons, instead of wxHELP, wxOK, etc.
  which are intended to be ORred together in a bit field.
- cpu/init.cc: put ifdefs around DEFPARAMs for flags in configurations
  where they don't exist.  Add an eflags shadow parameter that represents all
  of the bits of eflags at once.  There are also boolean shadow params for
  each bit.
- modified files: cpu/init.cc debug/dbg_main.cc debug/debug.h
  gui/siminterface.cc gui/siminterface.h gui/wxdialog.cc gui/wxdialog.h
  gui/wxmain.cc gui/wxmain.h
2002-09-13 19:39:38 +00:00
Bryce Denney
de51eda5d1 - apply patch.triple-fault-recover 2002-03-12 09:16:41 +00:00
instinc
0a87115340 added trace-reg-on and trace-reg-off commands 2001-11-28 18:37:12 +00:00
Bryce Denney
a9afc2336d - fix bug that caused the instruction to be executed to be NOT printed
when tracing was on.
2001-10-05 21:03:53 +00:00
Bryce Denney
daf2a9fb55 - add RCS Id to header of every file. This makes it easier to know what's
going on when someone sends in a modified file.
2001-10-03 13:10:38 +00:00
Bryce Denney
a07d62fd24 - add "info ne2k" command to the debugger, which prints all the registers
of the NE2000 model.
2001-09-29 19:16:34 +00:00
Bryce Denney
9a1364b1f9 - apply patches/patch.consistent2b. Description:
> This patch fixes a number of debugger problems.
>   - with trace-on, simulation time would pass 5x faster than usual, so
>     interrupts and other timed events would happen at different times
>   - with trace-on, breakpoints were ignored
>   - with trace-on, control-C would not stop the processor and return to the
>     debugger.
>
> This patch changes the execution quantum for the debugger to 1, which means
> that cpu_loop is asked to do one instruction at a time.  This may cause
> bochs with the debugger to be slower than before.
>
> I haven't tested without the debugger yet, so I don't know if the timing
> of events matches or not.
2001-09-27 14:19:38 +00:00
Bryce Denney
fd7e7ee86c - added debugger command "info fpu" which prints all FPU registers
in an output format similar to gdb (when you do info all-registers).
  Also, if you do "info all" you get the CPU registers and the FPU
  registers.
- added bx_cpu_c method called fpu_print_regs, which is implemented
  in wmFPUemu_glue.cc
2001-09-15 06:55:14 +00:00
Bryce Denney
e61d00351f - merged BRANCH-smp-bochs into main branch. For details see comments
in BRANCH-smp-bochs revisions.
- The general task was to make multiple CPU's which communicate
  through their APICs.  So instead of BX_CPU and BX_MEM, we now have
  BX_CPU(x) and BX_MEM(y).  For an SMP simulation you have several
  processors in a shared memory space, so there might be processors
  BX_CPU(0..3) but only one memory space BX_MEM(0).  For cosimulation,
  you could have BX_CPU(0) with BX_MEM(0), then BX_CPU(1) with
  BX_MEM(1).  WARNING: Cosimulation is almost certainly broken by the
  SMP changes.
- to simulate multiple CPUs, you have to give each CPU time to execute
  in turn.  This is currently implemented using debugger guards.  The
  cpu loop steps one CPU for a few instructions, then steps the
  next CPU for a few instructions, etc.
- there is some limited support in the debugger for two CPUs, for
  example printing information from each CPU when single stepping.
2001-05-23 08:16:07 +00:00
Bryce Denney
a6fef54678 - update copyright dates to 2001 for all mandrake headers
- for bochs files with other header, replaced with current mandrake header
2001-04-10 02:20:02 +00:00
Bryce Denney
ff34643472 - include osdep.h
- arg1 of bx_dbg_watch/unwatch is sent -1, 0, and 1 but was declared as
  a Boolean.
2001-04-10 01:45:37 +00:00
cvs
beff63eb32 - entered original Bochs snapshot bochs-2000_0325a.tar.gz from
ftp.bochs.com
2001-04-10 01:04:59 +00:00