- Added graphical Bochs debugger under Win32 host !

- Thanks for Chourdakis Michael and Bruce Ewing.
This commit is contained in:
Stanislav Shwartsman 2008-10-21 13:45:03 +00:00
parent 17d02735cb
commit fd65bf9de0
13 changed files with 5099 additions and 161 deletions

View File

@ -59,7 +59,7 @@
#display_library: sdl, options="fullscreen" # startup in fullscreen mode
#display_library: term
#display_library: win32, options="legacyF12" # use F12 to toggle mouse
#display_library: win32, options="windebug" # use experimental debugger gui
#display_library: win32, options="windebug" # use Win32 debugger gui
#display_library: wx
#display_library: x, options="hideIPS" # disable IPS output in status bar

View File

@ -1,5 +1,12 @@
Changes after 2.3.7 release:
Brief summary :
- Added graphical Bochs debugger under Win32 host !
- Thanks for Chourdakis Michael and Bruce Ewing.
- Many fixes in Bochs internal debugger and CPU instrumentation.
- Bugfixes for CPU emulation correctness.
Detailed change log :
- CPU and internal debugger
@ -65,6 +72,8 @@ Detailed change log :
[1981505] Init PIIX4 PCI to ISA bridge and IDE by Sebastian
- these S.F. bugs were closed
[1803018] new win32debug dialog problems
[2141679] windows vcc build broken
[2162824] latest cvs fails to compile
[2164506] latest bochs fails to start
[2106514] RIS / startrom.com install ALMOST works

4
bochs/configure vendored
View File

@ -1,5 +1,5 @@
#! /bin/sh
# From configure.in Id: configure.in,v 1.373 2008/08/11 18:53:21 sshwarts Exp .
# From configure.in Id: configure.in,v 1.374 2008/10/01 09:44:40 sshwarts Exp .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61.
#
@ -37969,7 +37969,7 @@ fi
LIBS="$LIBS -lcomctl32"
fi
fi
DIALOG_OBJS="win32dialog.o"
DIALOG_OBJS="win32dialog.o win32_enh_dbg.o"
EXPORT_DYNAMIC=""
;;
esac

View File

@ -2,7 +2,7 @@ dnl // Process this file with autoconf to produce a configure script.
AC_PREREQ(2.50)
AC_INIT(bochs.h)
AC_REVISION([[$Id: configure.in,v 1.374 2008-10-01 09:44:40 sshwarts Exp $]])
AC_REVISION([[$Id: configure.in,v 1.375 2008-10-21 13:45:03 sshwarts Exp $]])
AC_CONFIG_HEADER(config.h)
AC_CONFIG_HEADER(ltdlconf.h)
@ -2641,7 +2641,7 @@ case $target in
LIBS="$LIBS -lcomctl32"
fi
fi
DIALOG_OBJS="win32dialog.o"
DIALOG_OBJS="win32dialog.o win32_enh_dbg.o"
EXPORT_DYNAMIC=""
;;
esac

View File

@ -0,0 +1,173 @@
User tips: (ver 1.0)
The main user features available from the menus should be fairly obvious
to anyone who has used bochs -- but here are a few quick explanations, anyway.
These explanations include a few keyboard and mouse shortcuts that you might
not find through experimentation.
Terminology:
The Bochs guys call this GUI debugger interface the CI, to distinguish it
for themselves from the "VGA window" that shows the display of the simulated
computer. I will call this debugger GUI interface the "frontend". It's not
much better of a term, but oh well.
The text debugger interface that you are all familiar with is called the
Bochs Internal Debugger ("ID" for short).
The frontend is organized around 3 main "list-view" windows:
The Register window:
Typically, all the various registers are grouped by color. If you don't like the
colors, they can be turned off, or modified at compile time. There are options
to show or hide most register "groups", so that you can focus more strictly on
the registers you are interested in (probably just the GP registers).
Notes: Sometimes (on CPU mode changes, or when windows are being moved), the
System Registers (GDTR, IDTR, LDTR, TR) will appear on the Register list for
one "step". This is not a bug -- it is a kludge to get the columns to be the
right width.
Yes, the XMM display shows hex in the "decimal" column -- there is more
room there. Deal with it.
** Doubleclicking a register attempts to change its value. Bochs may not
allow you to change most registers. In future versions, more registers may
be modifiable.
The Disassembly window:
Disassembly output that is autoloaded, or generated from the menu, ends up
here. If the frontend cannot detect the "current instruction" in the list,
when it reaches the next instruction -- then it will autoload a new list.
Having a big list will reduce the number of autoloads, and allows you to see
more. The list can contain up to 2048 lines. However, if you load more than
1000 lines, you are likely to see big performance problems in Windows on
certain occasions -- like minimizing and then restoring the window. This is
a Windows bug/"feature".
Note: There are two kinds of emulated memory in bochs: Linear and Physical.
Emulated Linear memory is mapped onto Physical memory by x86 virtual memory
methods (paging and segmentation). If paging and segmenataion are "off", or
"identity mapped", then both "types" of memory mean the same thing. But they
still work a little differently. With the Internal Debugger, you can set
breakpoints to either kind of memory, separately. Normally, you would use
the "b" command to set breakpoints in physical mem, and "lb" to set breakpoints
in linear mem. This frontend ONLY displays linear breakpoints. It does not
bother trying to figure out the linear->phsical reverse mapping to show
physical breakpoints. (There are also "virtual" breakpoints that are also
not shown.) All the types of breakpoints still WORK, it is just that you
will not see them marked on the screen.
It will be obvious to you that the current instruction is marked in green,
unless it is on a breakpoint, when it turns blue. Breakpoints are red, of
course.
** You must click a line in the window, before you can use frontend commands
to set or clear a linear breakpoint on it.
** You can doubleclick (which saves steps) to set or clear a linear breakpoint.
** If you do a Find command to select a bunch of ASM lines, you can set linear
breakpoints to all of them at once, with the F6/Breakpoint command. However,
there is a limit compiled into bochs on the maximum number number of linear
breakpoints. The typical limit is TEN. Edit your config.h if you want more.
The MemDump window:
As of this version, the MemDump window isn't much more than a display of the
contents of memory. In later versions, hopefully it will be expanded into a
fairly fully-featured hexeditor. You can dump either phyical mem, or linear
mem. There are breakpoint-like things (that work with physical memory only,
currently), called "watchpoints". A physical memory address can cause a break
in the simulation if it is read, or written.
The frontend again does NOT try to calculate out the linear -> physical mapping
in any attempt to display the physical watchpoints while viewing linear mem.
You must click a hex byte (on a physical mem dump that shows bytes), in order to
set or clear a read and/or write watchpoint on that byte. Read watchpoints are
green (on black), write watchpoints are red, watchpoints that are both write
and read are blue. There is a hardcoded limit in bochs of 16 of each type of
watchpoint.
The MemDump window loads/shows 4K of memory at a time.
** PageUp/Down scrolls the display up or down through mem, 2K at a time.
** Doubleclicking a line of memory allows you to change the byte values.
(Works on both linear and physical mem dumps.)
** Doubleclicking with the Shift key down sets write watchpoints.
** Doubleclicking with Control sets read watchpoints.
** You can use both Shift and Control at the same time.
** You need to click once on the memory window before you can use its "Find"
function. The Find function is pretty limited in scope, currently. It can
only find bytes (or strings of bytes) within each 16byte "line".
Other windows:
The Output window shows anything that the Bochs Internal Debugger tries to send
to you. The window is scrollable, but only keeps a limited history of output (10K).
The ID is always spamming you with "Next at t=" and disassembly lines, that would
tend to fill up the Output window with garbage -- so there are options to ignore
either of these types of output.
The Input window is for sending user commands directly into the Bochs Internal
Debugger -- bypassing the frontend. Results will appear in the Output Window.
The Input window has a history feature for commands, using the Up and Down arrows --
it remembers 64 commands, 80 bytes each. No matter where you click on the frontend,
you can always type directly into the Input box without clicking on it.
When the Input window is invisible, you should still be able to type into it --
after taking into account the bug listed at the bottom of this file.
** Hitting Enter on a blank line will cause a Singlestep.
The Param Tree:
The bochs param_tree shows the internal state of most of bochs. It will be
expanded in the future to show even more. You can see the detailed state of
all cpu registers -- including the "hidden" parts (look in the "bochs" branch).
Or see the current state of most of the emulated hardware.
The Stack window:
The MemDump windows do not automatically refresh -- except for the Stack
window. If you leave the stack window active, it will update as the stack
changes. If you want to update the other MemDump windows with fresh data,
hit Refresh.
The Command Button row:
Just a (hopefully) convenient way of using the mouse, instead of the keyboard.
If you don't like them, or they take up too much space, you can turn them off.
The CPU Button row:
This only shows up when you are running a multi-cpu simulation. Click on the
CPU that you want to view. All CPUs are always stepped together, and they all
stop the first time one hits some sort of breakpoint.
Docking/Resizing:
If you grab one of the two vertical "bars" between the lists, you can horizontally
resize the lists. The cursor will change, but there will be no animation.
If you grab the middle of one of the lists, and drag it on top of one of the
other lists, you can reorder the positions of the lists on the screen. The
cursor will change, but there will be no animation. You can set an alternate
"docking order" at compile time, also, if you have a permanent preference.
(See the top of the wenhdbg_h.h file, for compile-time customization.)
Additional Notes:
If you have a really big GDT or Paging display in the MemDump window, and you
select a different display, it may take several seconds to delete the big display
before it can switch. Additionally, note the "windows feature" listed above --
it is not wise to minimize the display, if one of the lists is really big.
Uppercase text tends to seem a little annoying, but it really is a lot easier to
read, especially on a proportional font. If you change to a fixed font, then you
may want to switch the display to lowercase.
############
Known bug: if the frontend window is hidden or minimized, then restored -- you
will not be able to type into the Input window until you click somewhere.

View File

@ -336,21 +336,44 @@ term.o: term.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h
../iodev/guest2host.h ../iodev/slowdown_timer.h ../iodev/extfpuirq.h \
../iodev/gameport.h icon_bochs.h
textconfig.o: textconfig.@CPP_SUFFIX@ ../config.h ../osdep.h textconfig.h \
siminterface.h ../extplugin.h ../ltdl.h
siminterface.h ../extplugin.h
win32.o: win32.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h \
../bxversion.h ../gui/siminterface.h ../memory/memory.h ../pc_system.h \
../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h ../gui/textconfig.h \
../gui/keymap.h ../instrument/stubs/instrument.h ../iodev/iodev.h \
../iodev/pci.h ../iodev/pci2isa.h ../iodev/pci_ide.h ../iodev/pcivga.h \
../iodev/pciusb.h ../iodev/vga.h ../iodev/svga_cirrus.h \
../config.h ../osdep.h ../bxversion.h ../gui/siminterface.h \
../memory/memory.h ../pc_system.h ../plugin.h ../extplugin.h \
../gui/gui.h ../gui/textconfig.h ../config.h ../gui/keymap.h \
../instrument/stubs/instrument.h ../iodev/iodev.h ../bochs.h \
../iodev/pci.h ../iodev/pci2isa.h ../iodev/pci_ide.h ../iodev/acpi.h \
../iodev/pcivga.h ../iodev/vga.h ../iodev/svga_cirrus.h \
../iodev/ioapic.h ../cpu/apic.h ../iodev/biosdev.h ../iodev/cmos.h \
../iodev/dma.h ../iodev/floppy.h ../iodev/harddrv.h ../iodev/keyboard.h \
../iodev/parallel.h ../iodev/pic.h ../iodev/pit_wrap.h \
../iodev/pit82c54.h ../iodev/virt_timer.h ../iodev/serial.h \
../iodev/sb16.h ../iodev/unmapped.h ../iodev/ne2k.h \
../iodev/guest2host.h ../iodev/slowdown_timer.h ../iodev/extfpuirq.h \
../iodev/gameport.h
win32dialog.o: win32dialog.@CPP_SUFFIX@ ../config.h
../iodev/unmapped.h ../iodev/ne2k.h ../iodev/guest2host.h \
../iodev/slowdown_timer.h ../iodev/extfpuirq.h ../iodev/gameport.h \
win32dialog.h ../config.h win32res.h ../font/vga.bitmap.h
win32_enh_dbg.o: win32_enh_dbg.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h \
../bx_debug/debug.h ../config.h ../osdep.h ../bxversion.h \
../gui/siminterface.h ../memory/memory.h ../pc_system.h ../plugin.h \
../extplugin.h ../gui/gui.h ../gui/textconfig.h ../config.h \
../gui/keymap.h ../instrument/stubs/instrument.h ../cpu/cpu.h \
../disasm/disasm.h ../config.h ../cpu/crregs.h ../cpu/descriptor.h \
../cpu/instr.h ../cpu/lazy_flags.h ../cpu/icache.h ../cpu/apic.h \
../cpu/i387.h ../fpu/softfloat.h ../config.h ../fpu/tag_w.h \
../fpu/status_w.h ../fpu/control_w.h ../cpu/xmm.h win32dialog.h \
wenhdbg_h.h ../iodev/iodev.h ../bochs.h ../iodev/pci.h \
../iodev/pci2isa.h ../iodev/pci_ide.h ../iodev/acpi.h ../iodev/pcivga.h \
../iodev/vga.h ../iodev/svga_cirrus.h ../iodev/ioapic.h ../cpu/apic.h \
../iodev/biosdev.h ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h \
../iodev/harddrv.h ../iodev/keyboard.h ../iodev/parallel.h \
../iodev/pic.h ../iodev/pit_wrap.h ../iodev/pit82c54.h \
../iodev/virt_timer.h ../iodev/serial.h ../iodev/unmapped.h \
../iodev/ne2k.h ../iodev/guest2host.h ../iodev/slowdown_timer.h \
../iodev/extfpuirq.h ../iodev/gameport.h wenhdbg_res.h
win32dialog.o: win32dialog.@CPP_SUFFIX@ win32dialog.h ../config.h ../bochs.h \
../config.h ../osdep.h ../bx_debug/debug.h ../config.h ../osdep.h \
../bxversion.h ../gui/siminterface.h ../memory/memory.h ../pc_system.h \
../plugin.h ../extplugin.h ../gui/gui.h ../gui/textconfig.h ../config.h \
../gui/keymap.h ../instrument/stubs/instrument.h win32res.h
wx.o: wx.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h \
../bxversion.h ../gui/siminterface.h ../memory/memory.h ../pc_system.h \
../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h ../gui/textconfig.h \
@ -533,19 +556,42 @@ term.lo: term.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h
textconfig.lo: textconfig.@CPP_SUFFIX@ ../config.h ../osdep.h textconfig.h \
siminterface.h ../extplugin.h ../ltdl.h
win32.lo: win32.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h \
../bxversion.h ../gui/siminterface.h ../memory/memory.h ../pc_system.h \
../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h ../gui/textconfig.h \
../gui/keymap.h ../instrument/stubs/instrument.h ../iodev/iodev.h \
../iodev/pci.h ../iodev/pci2isa.h ../iodev/pci_ide.h ../iodev/pcivga.h \
../iodev/pciusb.h ../iodev/vga.h ../iodev/svga_cirrus.h \
../config.h ../osdep.h ../bxversion.h ../gui/siminterface.h \
../memory/memory.h ../pc_system.h ../plugin.h ../extplugin.h \
../gui/gui.h ../gui/textconfig.h ../config.h ../gui/keymap.h \
../instrument/stubs/instrument.h ../iodev/iodev.h ../bochs.h \
../iodev/pci.h ../iodev/pci2isa.h ../iodev/pci_ide.h ../iodev/acpi.h \
../iodev/pcivga.h ../iodev/vga.h ../iodev/svga_cirrus.h \
../iodev/ioapic.h ../cpu/apic.h ../iodev/biosdev.h ../iodev/cmos.h \
../iodev/dma.h ../iodev/floppy.h ../iodev/harddrv.h ../iodev/keyboard.h \
../iodev/parallel.h ../iodev/pic.h ../iodev/pit_wrap.h \
../iodev/pit82c54.h ../iodev/virt_timer.h ../iodev/serial.h \
../iodev/sb16.h ../iodev/unmapped.h ../iodev/ne2k.h \
../iodev/guest2host.h ../iodev/slowdown_timer.h ../iodev/extfpuirq.h \
../iodev/gameport.h
win32dialog.lo: win32dialog.@CPP_SUFFIX@ ../config.h
../iodev/unmapped.h ../iodev/ne2k.h ../iodev/guest2host.h \
../iodev/slowdown_timer.h ../iodev/extfpuirq.h ../iodev/gameport.h \
win32dialog.h ../config.h win32res.h ../font/vga.bitmap.h
win32_enh_dbg.lo: win32_enh_dbg.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h \
../bx_debug/debug.h ../config.h ../osdep.h ../bxversion.h \
../gui/siminterface.h ../memory/memory.h ../pc_system.h ../plugin.h \
../extplugin.h ../gui/gui.h ../gui/textconfig.h ../config.h \
../gui/keymap.h ../instrument/stubs/instrument.h ../cpu/cpu.h \
../disasm/disasm.h ../config.h ../cpu/crregs.h ../cpu/descriptor.h \
../cpu/instr.h ../cpu/lazy_flags.h ../cpu/icache.h ../cpu/apic.h \
../cpu/i387.h ../fpu/softfloat.h ../config.h ../fpu/tag_w.h \
../fpu/status_w.h ../fpu/control_w.h ../cpu/xmm.h win32dialog.h \
wenhdbg_h.h ../iodev/iodev.h ../bochs.h ../iodev/pci.h \
../iodev/pci2isa.h ../iodev/pci_ide.h ../iodev/acpi.h ../iodev/pcivga.h \
../iodev/vga.h ../iodev/svga_cirrus.h ../iodev/ioapic.h ../cpu/apic.h \
../iodev/biosdev.h ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h \
../iodev/harddrv.h ../iodev/keyboard.h ../iodev/parallel.h \
../iodev/pic.h ../iodev/pit_wrap.h ../iodev/pit82c54.h \
../iodev/virt_timer.h ../iodev/serial.h ../iodev/unmapped.h \
../iodev/ne2k.h ../iodev/guest2host.h ../iodev/slowdown_timer.h \
../iodev/extfpuirq.h ../iodev/gameport.h wenhdbg_res.h
win32dialog.lo: win32dialog.@CPP_SUFFIX@ win32dialog.h ../config.h ../bochs.h \
../config.h ../osdep.h ../bx_debug/debug.h ../config.h ../osdep.h \
../bxversion.h ../gui/siminterface.h ../memory/memory.h ../pc_system.h \
../plugin.h ../extplugin.h ../gui/gui.h ../gui/textconfig.h ../config.h \
../gui/keymap.h ../instrument/stubs/instrument.h win32res.h
wx.lo: wx.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h \
../bxversion.h ../gui/siminterface.h ../memory/memory.h ../pc_system.h \
../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h ../gui/textconfig.h \

390
bochs/gui/wenhdbg_h.h Executable file
View File

@ -0,0 +1,390 @@
// include file for the Win32 Enhanced GUI debugger frontend
// User Customizable initial settings:
bx_bool SeeReg[8] = {
TRUE, // in 64bit mode, show 32bit versions of registers also (EAX, ...)
FALSE, // show segment registers (CS, ...)
FALSE, // show GDTR, IDTR, LDTR, Task Reg
FALSE, // show control register (CR0, ...)
FALSE, // show FPU (STi) / MMX registers
FALSE, // show XMM registers
FALSE, // show the Debug Registers (DR0, ...)
FALSE // Test Registers not yet supported in bochs (2.3.7)
};
bx_bool ShowIOWindows = TRUE; // Display the top-row Step/Continue pushbuttons
bx_bool ShowButtons = TRUE; // Display the top-row Step/Continue pushbuttons
bx_bool SeeRegColors = TRUE; // Display registers with background color "groups"
bx_bool ignoreNxtT = TRUE; // Do not show "Next at t=" output lines
bx_bool ignSSDisasm = TRUE; // Do not show extra disassembly line at each break
int UprCase = 1; // 1 = convert all Asm, Register names, Register values to uppercase
int DumpInAsciiMode = 3; // bit 1 = show ASCII in dumps, bit 2 = show hex, value=0 is illegal
bx_bool isLittleEndian = TRUE;
int DefaultAsmLines = 250; // default # of asm lines disassembled and "cached"
int bottommargin = 6; // ASM autoscroller tries to leave this many lines below
int topmargin = 3; // autoscroller tries to leave this many lines above
// Note: topmargin must be less than bottommargin
// How to use DockOrder: the Register list is window 1, ASM is window 2, MemDump is window 3
// Create the hex value with the digits in the order you want the windows to be.
// 0x312 would have MemDump on the left, Register in the middle, ASM on the right
short DockOrder = 0x123; // set the default List "docking" (Reg, ASM, Dump)
COLORREF ColorList[16] = { // background "register type" colors indexed by RegColor value
RGB(255,255,255), // white
RGB(200,255,255), // blue (aqua)
RGB(230,230,230), // gray
RGB(248,255,200), // yellow
RGB(216,216,255), // purple
RGB(200,255,200), // green
RGB(255,230,200), // orange
RGB(255,255,255), // user definable
RGB(255,255,255),
RGB(255,255,255),
RGB(255,255,255),
RGB(255,255,255),
RGB(255,255,255),
RGB(255,255,255),
RGB(255,255,255),
RGB(255,255,255)
};
#define STATUS_WIN_OVERLAP 4 // # of "extra" pixels at the top of a Status window
#define STACK_ENTRIES 50 // # of words/dwords/qwords to display in stack window
// Note: STACK_ENTRIES must be <= 512
// END of User Customizable settings
#include <math.h>
#include "iodev/iodev.h"
#include "wenhdbg_res.h" // MenuIDs
#ifndef LVS_EX_DOUBLEBUFFER
#define IS_WIN98
// these two defines may not exist in some compilers
#define LVS_EX_DOUBLEBUFFER 0
#define LVIF_GROUPID 0
#endif
#define MAX_ASM 2048 // max entries in ASM window
// The wordsize popup is the 13th entry in the Opt menu -- COUNTING SEPARATORS
// Index = (entry number - 1) -- if the Opt menu is modified, then update this value
// -- or else the checkmarks won't work
#define WS_POPUP_IDX 12
// Handles to Windows and global stuff
HWND hY; // complete parent window
HWND hL[3]; // 0=registers, 1=Asm, 2=MemDump
HWND hE_I; // command input window
HWND hS_S; // "status" window at bottom
HWND hE_O; // debugger text output
HWND hT; // param_tree window
HWND hBTN[5]; // button row
HWND hCPUt[BX_MAX_SMP_THREADS_SUPPORTED]; // "tabs" for the individual CPUs
HFONT CustomFont = NULL;
HMENU hOptMenu; // "Options" popup menu (needed to set check marks)
HMENU hViewMenu; // "View" popup menu (needed to gray entries)
HMENU hCmdMenu; // "Command" popup menu (needed to gray entries)
// one "defualtProc" for each edit window (Input and Output)
WNDPROC wEdit[2];
WNDPROC wBtn; // all the buttons have the same Proc
WNDPROC wTreeView;
WNDPROC wListView; // all the lists use the same Proc
//HANDLE hTCevent[BX_MAX_SMP_THREADS_SUPPORTED]; // Start/Sleep Control for cpu_loop threads
// get a "class" to access the disassebler
// Note; any instance has access to all the member functions -- that is enough!
// -- i.e. No further initialization necessary.
static disassembler bx_disassemble;
// for refreshing the bochs VGA window:
BOCHSAPI extern bx_devices_c bx_devices;
// Note: all these BSS global variables are initialized to 0 automatically
Bit64u SelectedDataAddress = 0;
Bit64u CurrentAsmLA = 0; // = EIP/RIP -- for highlighting in ASM window
Bit64u BottomAsmLA; // beginning and end addrs on ASM window
Bit64u TopAsmLA;
Bit32u PrevStepNSize = 50; // cpu_loop control variables
//Bit32u RequestedLoops; // number of cpu_loops the user is asking for
//bx_bool DoBreak; // stop a local subthreaded cpu_loop
Bit64u PrevPtime = 9; // any number other than 0
Bit64u NewPtime; // used to test whether sim has "updated"
unsigned int TotCPUs; // # of CPUs in a multi-CPU simulation
unsigned int CurrentCPU; // cpu that is being displayed
// window resizing/docking stuff
HCURSOR hCursResize;
HCURSOR hCursDock;
HCURSOR hCursArrow;
LVHITTESTINFO lvht; // calculate and remember which list item was clicked
int OneCharWide; // average width of a char in current font
int Sizing = 0; // current "resizing/docking mode"
int Resize_HiX; // horizontal limits of the current resize operation
int Resize_LoX;
unsigned short BarScrx[2]; // position of central listview's left and right borders in SCREEN coordinates
unsigned short BarClix[2]; // in client coordinates
unsigned int ListWidthPix[3] = {5,7,8}; // set initial proportions of Reg, Asm, Dump windows
unsigned int LstTop = 0;
int CurCenterList;
int SizeList; // pre-docking list #
bx_bool DumpHasFocus = FALSE;
Bit32s xClick = -1; // halfway through a mouseclick flag + location
Bit32s yClick; // values are in Listview coordinates
Bit32u CurTimeStamp; // last mousedown time
short nDock[36] = { // lookup table for alternate DockOrders
0x231, 0x312, 0x231, 0x213, 0x132, 0x132,
0x213, 0x321, 0x123, 0x123, 0x321, 0x312,
0x213, 0x213, 0x123, 0x312, 0x321, 0x312,
0x132, 0x123, 0x132, 0x321, 0x231, 0x231,
0x312, 0x312, 0x231, 0x213, 0x132, 0x213,
0x132, 0x123, 0x321, 0x321, 0x123, 0x231
};
// base window "styles" for the 3 listviews.
long LVStyle[3] = {
LVS_REPORT | WS_CHILD,
LVS_SHOWSELALWAYS | LVS_REPORT | WS_CHILD,
LVS_SHOWSELALWAYS | LVS_REPORT | WS_CHILD | WS_VISIBLE
};
bx_bool AtBreak = FALSE; // Status indicators
bx_bool PrevAtBreak = FALSE;
bx_bool CpuModeChange = TRUE;
bx_bool StatusChange = TRUE;
bx_bool In64Mode = FALSE; // CPU modes
bx_bool In32Mode = FALSE;
unsigned CpuMode = 0;
Bit32u InPaging = 0; // Storage for the top bit of CR0, unmodified
bx_bool doOneTimeInit = TRUE; // Internal flags
bx_bool ResizeColmns; // address/value column autosize flag
bx_bool dbgOn = FALSE; // the bochs internal debugger needs some time to get started
bx_bool FWflag = FALSE; // friendly warning has been shown to user once already
int StackSized; // autosize flag for stack window
char *PrevStack; // buffer for testing changes in stack values
Bit64u PStackLA = 0; // to calculate alignment between prev and current stack
bx_bool StackEntChg[STACK_ENTRIES]; // flag for "change detected" on each stack line
bx_bool StkInvOnce = FALSE; // sometimes need to specially invalidate the stack window
// DViewModes
#define VIEW_MEMDUMP 0
#define VIEW_GDT 1
#define VIEW_IDT 2
#define VIEW_PAGING 3
#define VIEW_STACK 4
#define VIEW_PTREE 5
bx_bool DumpInitted = FALSE; // has the MemDump window ever been filled with data?
int DumpAlign = 1;
int PrevDAD; // saves "previous DumpAlign value" (forces column autosize)
char *DataDump;
Bit64u DumpStart = 0; // current emulated address (lin or phys) of DataDump
bx_bool doDumpRefresh;
int DViewMode = VIEW_MEMDUMP;
bx_bool DumpMode = 1; // 0 physical, 1 linear
char* DC0txt[2] = {"P.Address","L.Address"}; // DumpMode definitions in text
// make some global 512b temp char buffers -- they are needed to test against overflows anyway
char *tmpcb, *tmpcd; // space is allocated in bigbuf
char *tmpce, *tmpcf; // exclusively for use in subthreads
char *AsciiHex; // Unsigned char to printable hex xlat table
#define outbufSIZE 30720
char bigbuf[outbufSIZE]; // 30K preallocated storage for all char buffers (see DoAllInit)
char *DbgAppendPtr = bigbuf;
char *OutWindow; // buffer for the Output window
#define OutWinSIZE 10240
int OutWinCnt = OutWinSIZE; // available size of OutWindow buffer
int PO_Tdelay = 0; // delay before displaying partial output lines
int AsmLineCount = 1; // # of disassembled asm lines loaded
int AsmPgSize = 0;
int ListLineRatio; // number of vertical pixels in a ListView Item
int ListVerticalPix; // number of vertical pixels in each List
Bit64u AsmLA[MAX_ASM]; // linear address of each disassembled ASM line
// Command stuff
int CommandHistoryIdx = 0;
char *CmdHistory[64]; // 64 command History storage (fixed 80b each)
int CmdHInsert = 0; // index of next history entry to store
// register storage -- names and values
#define RAX_Rnum 0
#define RBX_Rnum 1
#define RCX_Rnum 2
#define RDX_Rnum 3
#define RSI_Rnum 4
#define RDI_Rnum 5
#define RBP_Rnum 6
#define RSP_Rnum 7
#define RIP_Rnum 8
#define R8_Rnum 9
#define R9_Rnum 10
#define R10_Rnum 11
#define R11_Rnum 12
#define R12_Rnum 13
#define R13_Rnum 14
#define R14_Rnum 15
#define R15_Rnum 16
#define EFL_Rnum 17 // it makes the most sense if EFLAGS is between RXX and EXX
#define EAX_Rnum 18 // because it "belongs with" both sets of GP registers
#define EBX_Rnum 19
#define ECX_Rnum 20
#define EDX_Rnum 21
#define ESI_Rnum 22
#define EDI_Rnum 23
#define EBP_Rnum 24
#define ESP_Rnum 25
#define EIP_Rnum 26
#define CS_Rnum 27
#define DS_Rnum 28
#define ES_Rnum 29
#define SS_Rnum 30
#define FS_Rnum 31
#define GS_Rnum 32
#define GDTRnum 33
#define IDTRnum 34
#define LDTRnum 35
#define TRRnum 36
#define CR0_Rnum 37
#define CR3_Rnum 38
#define CR4_Rnum 39
#define EFER_Rnum 40 // currently used to mark the last entry in rV[]
#define ST0_Rnum 41
#define ST1_Rnum 42
#define ST2_Rnum 43
#define ST3_Rnum 44
#define ST4_Rnum 45
#define ST5_Rnum 46
#define ST6_Rnum 47
#define ST7_Rnum 48
#define XMM0_Rnum 49
#define XMM1_Rnum 50
#define XMM2_Rnum 51
#define XMM3_Rnum 52
#define XMM4_Rnum 53
#define XMM5_Rnum 54
#define XMM6_Rnum 55
#define XMM7_Rnum 56
#define XMM8_Rnum 57
#define XMM9_Rnum 58
#define XMMA_Rnum 59
#define XMMB_Rnum 60
#define XMMC_Rnum 61
#define XMMD_Rnum 62
#define XMME_Rnum 63
#define XMMF_Rnum 64
#define DR0_Rnum 65
#define DR1_Rnum 66
#define DR2_Rnum 67
#define DR3_Rnum 68
#define DR6_Rnum 69
#define DR7_Rnum 70
// #define TR0_Rnum 71 -- put Test Registers in here when they are supported
#define TOT_REG_NUM 72
// extra "register numbers" for registers that have more than one part
#define GDTR_Lim 72
#define IDTR_Lim 73
#define ST0_exp 74
#define ST1_exp 75
#define ST2_exp 76
#define ST3_exp 77
#define ST4_exp 78
#define ST5_exp 79
#define ST6_exp 80
#define ST7_exp 81
#define XMM0_hi 82
#define XMM1_hi 82
#define XMM2_hi 83
#define XMM3_hi 84
#define XMM4_hi 85
#define XMM5_hi 86
#define XMM6_hi 87
#define XMM7_hi 88
#define XMM8_hi 89
#define XMM9_hi 90
#define XMMA_hi 91
#define XMMB_hi 92
#define XMMC_hi 93
#define XMMD_hi 94
#define XMME_hi 95
#define XMMF_hi 96
#define EXTRA_REGS 28
char * EflBName[16] = {
"cf", "pf", "af", "zf", "sf", "tf", "if", "df", "of", "nt", "rf", "vm", "ac", "vif", "vip", "id"
};
int EflBNameLen[16] = {
2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,2
};
int EflBitVal[16] = {
1, 4, 0x10, 0x40, 0x80, 0x100, 0x200, 0x400, 0x800, 0x4000, 0x10000, 0x20000, 0x40000, 0x80000, 0x100000, 0x200000
};
// only pay special attention to registers up to EFER
char* RegLCName[EFER_Rnum + 1] = {
"rax","rbx","rcx","rdx","rsi","rdi","rbp","rsp","rip",
"r8","r9","r10","r11","r12","r13","r14","r15",
"eflags","eax","ebx","ecx","edx","esi","edi","ebp","esp","eip",
"cs","ds","es","ss","fs","gs",
"gdtr","idtr","ldtr","tr","cr0","cr3","cr4","efer"
};
char* RDispName[EFER_Rnum + 1];
bx_param_num_c *RegObject[BX_MAX_SMP_THREADS_SUPPORTED][TOT_REG_NUM + EXTRA_REGS];
Bit64u rV[EFER_Rnum + 1]; // current values of registers
Bit64u PV[EFER_Rnum + 1]; // previous values of registers
Bit32s GDT_Len; // "limits" (= bytesize-1) for GDT and IDT
Bit32s IDT_Len;
Bit8u RegColor[TOT_REG_NUM]; // specifies foreground and background color of registers
// Text color is red if the upper bit is set. Background is set according to ColorList.
int RitemToRnum[TOT_REG_NUM]; // mapping from Reg List Item# to register number
// lviG is a generic ListViewItem with GroupID -- reused many times
LV_ITEM lviG = {LVIF_TEXT | LVIF_GROUPID,0,0,0,0,(LPSTR)0,0,0,0};
TVINSERTSTRUCT tvis; // tree-view generic item
Bit64u ladrmin = 0; // bochs linear addressing access variables
Bit64u ladrmax = 0;
Bit64u l_p_offset;
#define BTN_BASE 1024
#define MULTICPU_BTN_BASE 1030
int BtnLkup[6] = {
CMD_CONT, CMD_STEP1, CMD_STEPN, CMD_BREAK, CMD_RFRSH, CMD_BRKALL
};
char* BTxt[6] = {"Continue [c]","Step [s]","Step N [s ###]","Break [^C]","Refresh","Break All"};
char* GDTt2[8] = {"16-bit code","64-bit code","32-bit code","16-bit data","64-bit data","32-bit data","Illegal","Unused"};
char* GDTsT[] = { "","Available 16bit TSS","LDT","Busy 16bit TSS","16bit Call Gate",
"Task Gate","16bit Interrupt Gate","16bit Trap Gate","Reserved",
"Available 32bit TSS","Reserved","Busy 32bit TSS","32bit Call Gate",
"Reserved","32bit Interrupt Gate","32bit Trap Gate"
};
// Register hex display formats -- index by UprCase
char* Fmt64b[2] = { "%016I64x", "%016I64X" };
char* Fmt32b[2] = { "%08x", "%08X" };
char* Fmt16b[2] = { "%04x", "%04X" };
char* xDT64Fmt[2] = { "%016I64x (%4x)", "%016I64X (%4X)" };
char* xDT32Fmt[2] = { "%08x (%4x)", "%08X (%4X)" };
// do the linear breakpoint list as 2 arrays, rather than a structure -- much easier to search!
bx_address BrkLAddr[BX_DBG_MAX_LIN_BPOINTS];
unsigned int BrkIdx[BX_DBG_MAX_LIN_BPOINTS];
int BreakCount = 0;
// AskTest stuff
struct ASKTEXT {
const TCHAR* ti;
const TCHAR* as;
TCHAR* re;
int DefT;
};

55
bochs/gui/wenhdbg_res.h Executable file
View File

@ -0,0 +1,55 @@
// The menuIDs should not have big "gaps" -- so the switch works well.
// A few small gaps is OK.
#define CMD_CONT 101
#define CMD_STEP1 102
#define CMD_STEPN 103
#define CMD_BREAK 105
#define CMD_BRKALL 106
#define CMD_BRKPT 107
#define CMD_WPTWR 108
#define CMD_WPTRD 109
#define CMD_FIND 110
#define CMD_RFRSH 111
#define CMD_PHYDMP 113
#define CMD_LINDMP 114
#define CMD_STACK 115
#define CMD_GDTV 116
#define CMD_IDTV 117
#define CMD_PAGEV 118
#define CMD_CMEM 119
#define CMD_PTREE 120
#define CMD_DISASM 121
// It is important that all the menuIDs on the "Options" menu be higher than on any other menu
// It is important that CMD_MODEB be the lowest menuID on the option window
#define CMD_MODEB 123
#define CMD_DADEF 124
#define CMD_ATTI 125
#define CMD_FONT 126
#define CMD_IOWIN 127
#define CMD_SBTN 128
#define CMD_UCASE 129
#define CMD_MHEX 130
#define CMD_MASCII 131
#define CMD_LEND 132
// The CMD_WS menuID's must be strictly "contiguous" and in-order
#define CMD_WS_1 133
#define CMD_WS_2 134
#define CMD_WS_4 135
#define CMD_WS_8 136
#define CMD_WS16 137
#define CMD_IGNSA 138
#define CMD_IGNNT 139
#define CMD_RCLR 140
// The next 8 menuID's must be strictly "contiguous" and in-order
#define CMD_EREG 141
#define CMD_SREG 142
#define CMD_SYSR 143
#define CMD_CREG 144
#define CMD_FPUR 145
#define CMD_XMMR 146
#define CMD_DREG 147
#define CMD_TREG 148
#define CMD_ABOUT 149

4289
bochs/gui/win32_enh_dbg.cc Executable file

File diff suppressed because it is too large Load Diff

View File

@ -1,34 +1,22 @@
/////////////////////////////////////////////////////////////////////////
// $Id: win32dialog.cc,v 1.62 2008-02-05 22:57:41 sshwarts Exp $
// $Id: win32dialog.cc,v 1.63 2008-10-21 13:45:03 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
#include "config.h"
#include "win32dialog.h"
#if BX_USE_TEXTCONFIG && defined(WIN32)
extern "C" {
#include <assert.h>
#include <stdio.h>
#include <windows.h>
#include <commctrl.h>
#include <shlobj.h>
#include <ctype.h>
}
#include "bochs.h"
#include "win32res.h"
#include "siminterface.h"
#include "textconfig.h"
#include "win32dialog.h"
const char log_choices[5][16] = {"ignore", "log", "ask user", "end simulation", "no change"};
static int retcode = 0;
static bxevent_handler old_callback = NULL;
static void *old_callback_arg = NULL;
#if BX_DEBUGGER
static HWND hDebugDialog = NULL;
static char *debug_cmd = NULL;
static BOOL debug_cmd_ready = FALSE;
static BOOL showCPU = FALSE;
static bx_param_num_c *cpu_param[16];
HWND hDebugDialog = NULL;
char *debug_cmd = NULL;
BOOL debug_cmd_ready = FALSE;
#endif
int AskFilename(HWND hwnd, bx_param_filename_c *param, const char *ext);
@ -904,124 +892,6 @@ int RuntimeOptionsDialog()
return retcode;
}
#if BX_DEBUGGER
void RefreshDebugDialog()
{
unsigned i;
char buffer[20];
if (showCPU) {
for (i = 0; i < 15; i++) {
sprintf(buffer, "%08X", cpu_param[i]->get());
SetDlgItemText(hDebugDialog, IDCPUVAL1+i, buffer);
}
}
}
static BOOL CALLBACK DebuggerDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
unsigned i;
int idx, lines;
static RECT R;
switch (msg) {
case WM_INITDIALOG:
GetWindowRect(hDlg, &R);
#if BX_SUPPORT_X86_64
cpu_param[0] = SIM->get_param_num("cpu0.RAX", SIM->get_bochs_root());
cpu_param[1] = SIM->get_param_num("cpu0.RBX", SIM->get_bochs_root());
cpu_param[2] = SIM->get_param_num("cpu0.RCX", SIM->get_bochs_root());
cpu_param[3] = SIM->get_param_num("cpu0.RDX", SIM->get_bochs_root());
cpu_param[4] = SIM->get_param_num("cpu0.RSP", SIM->get_bochs_root());
cpu_param[5] = SIM->get_param_num("cpu0.RBP", SIM->get_bochs_root());
cpu_param[6] = SIM->get_param_num("cpu0.RSI", SIM->get_bochs_root());
cpu_param[7] = SIM->get_param_num("cpu0.RDI", SIM->get_bochs_root());
cpu_param[8] = SIM->get_param_num("cpu0.RIP", SIM->get_bochs_root());
#else
cpu_param[0] = SIM->get_param_num("cpu0.EAX", SIM->get_bochs_root());
cpu_param[1] = SIM->get_param_num("cpu0.EBX", SIM->get_bochs_root());
cpu_param[2] = SIM->get_param_num("cpu0.ECX", SIM->get_bochs_root());
cpu_param[3] = SIM->get_param_num("cpu0.EDX", SIM->get_bochs_root());
cpu_param[4] = SIM->get_param_num("cpu0.ESP", SIM->get_bochs_root());
cpu_param[5] = SIM->get_param_num("cpu0.EBP", SIM->get_bochs_root());
cpu_param[6] = SIM->get_param_num("cpu0.ESI", SIM->get_bochs_root());
cpu_param[7] = SIM->get_param_num("cpu0.EDI", SIM->get_bochs_root());
cpu_param[8] = SIM->get_param_num("cpu0.EIP", SIM->get_bochs_root());
#endif
cpu_param[9] = SIM->get_param_num("cpu0.CS.selector", SIM->get_bochs_root());
cpu_param[10] = SIM->get_param_num("cpu0.DS.selector", SIM->get_bochs_root());
cpu_param[11] = SIM->get_param_num("cpu0.ES.selector", SIM->get_bochs_root());
cpu_param[12] = SIM->get_param_num("cpu0.FS.selector", SIM->get_bochs_root());
cpu_param[13] = SIM->get_param_num("cpu0.GS.selector", SIM->get_bochs_root());
cpu_param[14] = SIM->get_param_num("cpu0.EFLAGS", SIM->get_bochs_root());
return TRUE;
case WM_CLOSE:
bx_user_quit = 1;
SIM->debug_break();
DestroyWindow(hDebugDialog);
hDebugDialog = NULL;
break;
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDEXEC:
GetDlgItemText(hDlg, DEBUG_CMD, debug_cmd, 512);
if (lstrlen(debug_cmd) > 0) {
debug_cmd_ready = TRUE;
} else {
SetFocus(GetDlgItem(hDlg, DEBUG_CMD));
}
break;
case IDSTOP:
SIM->debug_break();
break;
case IDSHOWCPU:
showCPU = !showCPU;
if (showCPU) {
SetDlgItemText(hDlg, IDSHOWCPU, "Hide CPU <<");
MoveWindow(hDlg, R.left, R.top, R.right - R.left + 300, R.bottom - R.top, TRUE);
RefreshDebugDialog();
} else {
SetDlgItemText(hDlg, IDSHOWCPU, "Show CPU >>");
MoveWindow(hDlg, R.left, R.top, R.right - R.left, R.bottom - R.top, TRUE);
}
for (i = 0; i < 15; i++) {
ShowWindow(GetDlgItem(hDlg, IDCPULBL1+i), showCPU ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(hDlg, IDCPUVAL1+i), showCPU ? SW_SHOW : SW_HIDE);
}
break;
}
case WM_USER:
if (wParam == 0x1234) {
EnableWindow(GetDlgItem(hDlg, DEBUG_CMD), lParam > 0);
EnableWindow(GetDlgItem(hDlg, IDEXEC), lParam > 0);
EnableWindow(GetDlgItem(hDlg, IDSTOP), lParam == 0);
SetFocus(GetDlgItem(hDlg, (lParam > 0)?DEBUG_CMD:IDSTOP));
} else if (wParam == 0x5678) {
lines = SendMessage(GetDlgItem(hDlg, DEBUG_MSG), EM_GETLINECOUNT, 0, 0);
if (lines > 100) {
idx = SendMessage(GetDlgItem(hDlg, DEBUG_MSG), EM_LINEINDEX, 1, 0);
SendMessage(GetDlgItem(hDlg, DEBUG_MSG), EM_SETSEL, 0, idx);
SendMessage(GetDlgItem(hDlg, DEBUG_MSG), EM_REPLACESEL, 0, (LPARAM)"");
lines--;
}
idx = SendMessage(GetDlgItem(hDlg, DEBUG_MSG), EM_LINEINDEX, lines - 1, 0);
idx += SendMessage(GetDlgItem(hDlg, DEBUG_MSG), EM_LINELENGTH, idx, 0);
SendMessage(GetDlgItem(hDlg, DEBUG_MSG), EM_SETSEL, idx, idx);
SendMessage(GetDlgItem(hDlg, DEBUG_MSG), EM_REPLACESEL, 0, lParam);
}
break;
}
return FALSE;
}
void InitDebugDialog(HWND mainwnd)
{
hDebugDialog = CreateDialog(GetModuleHandle(NULL), MAKEINTRESOURCE(DEBUGGER_DLG), mainwnd,
(DLGPROC)DebuggerDlgProc);
ShowWindow(hDebugDialog, SW_SHOW);
}
#endif
BxEvent* win32_notify_callback(void *unused, BxEvent *event)
{
int opts;
@ -1044,6 +914,7 @@ BxEvent* win32_notify_callback(void *unused, BxEvent *event)
debug_cmd = new char[512];
SendMessage(hDebugDialog, WM_USER, 0x1234, 1);
debug_cmd_ready = FALSE;
SendMessage(hDebugDialog, WM_USER, 0x1234, 2);
while (!debug_cmd_ready && (hDebugDialog != NULL)) {
Sleep(10);
}

View File

@ -1,14 +1,32 @@
/////////////////////////////////////////////////////////////////////////
// $Id: win32dialog.h,v 1.11 2006-11-17 16:50:39 vruppert Exp $
// $Id: win32dialog.h,v 1.12 2008-10-21 13:45:03 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
#include "config.h"
#ifndef _WIN32_IE
#define _WIN32_IE 0x0400 // Force a minimum "OS level" for commctrl.h
#endif
#if _WIN32_IE < 0x0400
#undef _WIN32_IE
#define _WIN32_IE 0x0400
#endif
extern "C" {
#include <assert.h>
#include <stdio.h>
#include <windows.h>
#include <commctrl.h>
#include <shlobj.h>
#include <ctype.h>
}
#if BX_USE_TEXTCONFIG && defined(WIN32)
int RuntimeOptionsDialog();
#if BX_DEBUGGER
void InitDebugDialog(HWND mainwnd);
void RefreshDebugDialog();
#endif
void win32_init_notify_callback();

86
bochs/win32_enh_dbg.rc Executable file
View File

@ -0,0 +1,86 @@
#include <windows.h>
#include "gui/wenhdbg_res.h"
MENU_1 MENU
BEGIN
POPUP "&Command"
BEGIN
MENUITEM "Continue [c]\tF5",CMD_CONT
MENUITEM "Step [s]\tF11",CMD_STEP1
MENUITEM "Step #...\tF9",CMD_STEPN
MENUITEM "Break\tCtrl+C",CMD_BREAK
MENUITEM SEPARATOR
MENUITEM "Breakpoint (ASM selected)\tF6",CMD_BRKPT
MENUITEM "Watch Write (PhysDump selected)\tF6",CMD_WPTWR
MENUITEM "Watch Read (PhysDump selected)\tCtrl+F6",CMD_WPTRD
MENUITEM SEPARATOR
MENUITEM "Find...\tCtrl+F",CMD_FIND
MENUITEM "Refresh Screen\tF4",CMD_RFRSH
END
POPUP "&View"
BEGIN
MENUITEM "Physical Dump...\tCtrl+F7",CMD_PHYDMP
MENUITEM "Linear Dump...\tF7",CMD_LINDMP
MENUITEM "Stack\tF2",CMD_STACK
MENUITEM "GDT\tCtrl+F2",CMD_GDTV
MENUITEM "IDT\tShift+F2",CMD_IDTV
MENUITEM "Page Table\tAlt+F2",CMD_PAGEV
MENUITEM "Current MemDump\tEsc",CMD_CMEM
MENUITEM SEPARATOR
MENUITEM "Bochs param_tree\tCtrl+F3",CMD_PTREE
MENUITEM "Disassemble...\tCtrl+D",CMD_DISASM
END
POPUP "&Options"
BEGIN
MENUITEM "Break on CPU mode change\tShift+F6",CMD_MODEB
MENUITEM "Default disassembled lines ...",CMD_DADEF
MENUITEM "Toggle Intel/ATT syntax\tF3",CMD_ATTI
MENUITEM SEPARATOR
MENUITEM "Font...",CMD_FONT
MENUITEM "Text in UPPERCASE",CMD_UCASE
MENUITEM "Show Input/Output Windows",CMD_IOWIN
MENUITEM "Show Buttons",CMD_SBTN
MENUITEM SEPARATOR
MENUITEM "MemDump in Hex\tAlt+F7",CMD_MHEX
MENUITEM "MemDump in ASCII\tShift+F7",CMD_MASCII
MENUITEM "LittleEndian",CMD_LEND
POPUP "Dump 'Wordsize'"
BEGIN
MENUITEM "1 byte\tAlt+1",CMD_WS_1
MENUITEM "2 bytes\tAlt+2",CMD_WS_2
MENUITEM "4 bytes\tAlt+4",CMD_WS_4
MENUITEM "8 bytes\tAlt+8",CMD_WS_8
MENUITEM "16 bytes\tAlt+6 ",CMD_WS16
END
MENUITEM SEPARATOR
MENUITEM "Ignore extra ASM lines",CMD_IGNSA
MENUITEM "Ignore 'Next at t='",CMD_IGNNT
MENUITEM SEPARATOR
MENUITEM "Colorize Register Types",CMD_RCLR
// the next 8 MUST be in strict menuID order
MENUITEM "Show 32bit Registers",CMD_EREG
MENUITEM "Show Segment Registers",CMD_SREG
MENUITEM "Show System Registers",CMD_SYSR
MENUITEM "Show Control Registers",CMD_CREG
MENUITEM "Show MMX/FPU Registers\tAlt+F3",CMD_FPUR
MENUITEM "Show SSE Registers\tCtrl+F4",CMD_XMMR
MENUITEM "Show Debug Registers\tShift+F4",CMD_DREG
MENUITEM "Show Test Registers",CMD_TREG
END
POPUP "&Help"
BEGIN
MENUITEM "About...",CMD_ABOUT
END
END
DIALOG_AT DIALOGEX 0, 0, 365, 62
STYLE DS_ABSALIGN | DS_MODALFRAME | DS_3DLOOK | DS_CENTER | 0x200L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX
FONT 8, "Tahoma", 400, 0
BEGIN
CONTROL "", 101, "static", SS_CENTER | WS_CHILD | WS_VISIBLE, 10, 9, 284, 26
CONTROL "", 102, "edit", ES_AUTOHSCROLL | ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 10, 41, 285, 15
CONTROL "OK", IDOK, "BUTTON", BS_PUSHBUTTON | BS_CENTER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 303, 22, 50, 14
CONTROL "Cancel", IDCANCEL, "BUTTON", BS_PUSHBUTTON | BS_CENTER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 303, 41, 50, 14
END

View File

@ -184,3 +184,4 @@ BEGIN
END
#include "bxversion.rc"
#include "win32_enh_dbg.rc"