Debugger

Debugger Dialog

This section describes the debugger dialog box.

Core Tab

The Core tab displays the general purpose registers, as shown below. The information updates to the current state as the simulation runs.

Registers

The contents of sixteen registers are displayed in the Core tab. The contents are editable. You can click in the window of the register contents you want to edit and make your changes.

Flags

The flags listing text is located in a grey box below the EDX, ESI, and EDI register listings. The table below contains the flag definitions. An uppercase letter represents a 1. A lowercase letter represents a 0. For example,

id vp vf ac vm rf nt 00 o d I t s Z a P c

represents

0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 1 0

Note that 00 represents the current I/O privilege level and can be displayed as 00, 01, 10, or 11.

 

Flag Definitions

Flag

Definition

C

Carry

P

Parity

ID

Identification

VP

Virtual interrupt pending

VF

Virtual interrupt

AC

Alignment check

VM

Virtual 8086 mode

RF

Resume flag

NT

Nested task

00

I/O privilege level

O

Overflow

D

Direction

I

Interrupt enable

T

Trap

S

Sign

Z

Zero

A

Auxiliary carry

 

Disassembly Listing

The disassembly list box, located at the bottom, shows the current state of the instruction execution. The instruction listed first below the line is the instruction to be executed. The instructions below that indicate instructions that are yet to be executed and the instructions above the line are those that have just been executed.

Command Box

The Command Box at the bottom of the Core tab, as shown above, allows you to enter debug commands.

Entering a ? displays a list of debugger commands. Below is a list of the commands you can issue.

Debug Commands

Debugger Command Quick Reference

Command

Definition

d <linear address>

Display memory as bytes.

dw <linear address>

Display memory as words.

dd <linear address>

Display memory as dwords.

e <linear address><string of 2-digit hex bytes>

Alter memory contents.

For example,
e b800:0 01 02 03 04

changes the first four bytes at b800:0, b800:1, b800:2, and b800:3 to the values 01, 02, 03, and 04, respectively.

g [<address>]

Go. Optional temporary breakpoint at <address>.

h

History. Displays the last 1024 instructions that were executed.

i <xx>

Input byte from port <xx>.

iw <xx>

Input word from port <xx>.

id <xx>

Input dword from port <xx>.

l <linear address>

Linear to physical translation. Intended to help debug paging code. This command is not fully implemented.

o <xx><yy>

Output byte <yy> to port <xx>.

o <xx><yyy>

Output word <yyyy> to port <xx>.

o <xx><yyyyyyyy>

Output dword <yyyyyyyy> to port <xx>.

p <physical address>

Display memory as bytes.

pw <physical address>

Display memory as words.

pd <physical address>

Display memory as dwords.

s <address range><value>[...<value>]

Search address range for specified value(s).

s <address range><`string'>

Search address range for specified string.

t [nnn]

Step. nnn = number of instructions to execute.

u [address]

Unassemble (e.g., u cs:1234).

v

Displays version numbers of the different modules that make up the processor (CPU) device.

x1

XTrace. Functions like the t command, without a count.

Extended Tab

The Extended tab displays miscellaneous extended registers and floating point unit (FPU) registers, as shown below. The FPU registers are listed in physical order, FPU0-FPU7. The text following the register name changes to indicate the relative position to the top of the stack as items are pushed/popped from the FPU stack.

 

The FPU registers are listed in physical order, FPU0-FPU7. The text following the register name changes to indicate the relative position to the top of the stack as items are pushed/popped from the FPU stack.

The first window after the register name displays the register contents. The next window displays the content interpretation as an x87 datum. The last two windows after the register name display the register content as two packed 3DNow!® technology numbers.

Breakpoints Tab

The Breakpoints tab, shown below, displays any currently enabled breakpoints.

Breakpoint Dialog

Clicking on the Add or Change button brings up the dialog shown in below.

The Mask window in the above dialog defines bits for address compare. This enables you to set up a breakpoint on any of a group of addresses.

Using the logging options ( Logging On , Logging Off , Toggle Logging ), you can enable and disable CPU-specific logging messages. Note that to capture the logging messages, the -T flag must be given at the command line.


1. The x command functions like the t command without a count, unless the instruction to be executed is one of the following:

INT n, INT3, INTO

CALL

MOVS, LODS, CMPS, STOS, SCAS, INS, OUTS

LOOP, LOOPx

In this case, the x command places a temporary breakpoint at the instruction following the current instruction and executes a go command. This causes subroutine calls, interrupts, repeated instructions, and loops to be stepped over.