DOS/32 Advanced DOS Extender - Utility Programs 4.0 - DOS/32 Advanced - SUNSYS Protected Mode Debugger SUNSYS Protected Mode Debugger is a stand alone debugger program which allows programmers to debug 16-bit and 32-bit protected mode applications. The Debugger supports the "LE" and "LX" Linear Executable formats which are used by WATCOM Linker when creating DOS/4GW protected mode applications. The usage of SUNSYS Protected Mode Debugger is: SD <execname.xxx> where the execname.xxx is the file name of the protected mode application that is to be debugged. Additionally, a library version of the Debugger, supplied with DOS/32 Advanced DOS Extender can be statically linked into your applications. To be able to use the Debugger library you need to include the line #include <debug.h> into your source files. Before the Debugger library can be used by your program, it needs to be activated, which is done by calling the Debug_Init() function (usually done at the startup of the program). Every time a breakpoint (placed by a call to DBG() function) in your program is encountered, the application will break to the debugger, allowing you to debug the code. The SUNSYS Debugger's user interface consists of a number of windows in which the debugger displays the information, including disassembled CPU instructions, CPU registers, memory and stack contents etc. Below is included a short reference of all the windows, their purpose and the actions that can be performed in them.
CPU 80x86/80x87 Window
This window displays the disassembled instructions of the code you are currently debugging.
Key | Action | Description
ESC | Repaint Screen | clear and repaint the screen
TAB | Next Window | switch to the next window
SHIFT-TAB | Prev Win | switch to the previous window
ALT-X | Exit Debugger | exit to DOS
PRINT SCREEN | DumpScr | write the contents of the screen to a file on disk
ENTER | New Address | view the disassembled code at a new address; addresses preceded by a '.' (point) are treated as unrelocated addresses, you can also specify a general register that contains the new address
1 |  | switch between the TD- and WD-style text screen
2 |  | switch between the 16-bit and 32-bit instructions
3 or ',' |  | turn on/off FPU registers shown in Stings Window
4 or '.' |  | turn on/off unrelocated addresses
ARROWS UP and DOWN |  | move the cursor up and down
ARROWS LEFT and RIGHT |  | shift the code by one byte up or down
PAGE UP and PAGE DOWN |  | move the cursor one page up or down
HOME |  | move the cursor to the address held by EIP
'+' and '-' |  | cycle through the selectors in the Memory Window
F1 | Show Info | show system information (see below)
F2 | BreakPoint | place a hardware breakpoint at the address under the cursor; the maximum of 3 (three) breakpoints can be active at the same time
F3 | Return | return from subroutine; run until RET, IRET, RETF or an unconditional JMP instructions, then break to the debugger
F4 | Run Here | run to the address under the cursor
F5 | User Screen | switch to the user screen
F6 | New Address | skip to cursor; place the address value under the cursor into the EIP register
F7 | Trace Into | single step through the program, stepping into CALL, LOOP and REP-prefixed instructions
F8 | Step Over | single step through the program, stepping over CALL, LOOP and REP-prefixed instructions
F9 | Run | continue execution of the program
F10 | Step Over Jumps | single step through the program, stepping over CALL, LOOP, REP-prefixed and JUMP instructions; a breakpoint will be placed directly after the JUMP instruction, allowing you to step over the Jcc ímplemented loops
F11 | Search New | search for an expression; symbol "*" can be used to indicate the wild-cards, for example: mov ax,[ebx+***] will match any move to ax from the address pointed to by ebx plus any other 32-bit general register
F12 | Search Next | continue searching for the previously entered string
System Information (activated by F1 key)
Shows information about the system, descriptors, interrupts and memory blocks. Use the ESC key to return to the CPU Window.
F1 | DPMI information |
F2 | GDT information | use keys PGUP and PGDOWN to scroll the data in the window
F3 | IDT information | use keys PGUP and PGDOWN to scroll the data in the window
F4 | EMBs Information | use keys UP, DOWN, PGUP and PGDOWN to scroll the data in the window
F5 | System Interrupt History | use keys UP, DOWN, PGUP and PGDOWN to scroll the data in the window; keys 1, 2, 3 and 4 select a particular interrupt (INT 10h, 21h, 31h and 33h respective), 0 shows all; use the key BACKSPACE to clear the history buffer
F6 | Buffered Interrupts Information | use keys: '1' to show INT 10h, '2' to show INT 21h, '3' to show INT 31h, '4' to show INT 33h and '0' to show All
F10 | DOS Extender and Debugger version |
CPU Registers Window
In this window will be shown all the CPU general registers, segment registers and the extended flags.
Key | Action | Description
ESC | Return to CPU | switch back to the CPU Window
TAB | Next Window | switch to the next window
SHIFT-TAB | Prev Win | switch to the previous window
ALT-X | Exit Debugger | exit to DOS
ENTER | New Value | change the value of the selected register; instead of typing in a number, you can also specify a general register that contains the new value
ARROWS UP and DOWN |  | move the cursor up and down, select a register
ARROWS LEFT and RIGHT |  | move the cursor left and right, select a register
PAGE UP and PAGE DOWN |  | move the cursor to the next group of registers
HOME |  | move the cursor to the EAX register
END |  | move the cursor to the Carry Flag
'+' and '-' on keypad |  | increment or decrement the selected register's value
'/' on keypad |  | clear the contents of the selected register (reset to 0)
'*' on keypad |  | binary NOT the contents of the selected register (NOT reg)
Memory Window
In this window will be displayed the contents of the memory at the specified address.
Key | Action | Description
ESC | Return to CPU | switch back to the CPU Window
TAB - Next Window | Next Window | switch to the next window
SHIFT-TAB | Prev Win | switch to the previous window
ALT-X | Exit Debugger | exit to DOS
ENTER | New Address | view the memory contents at specified address; the addresses preceeded by a '.' are treated as unrelocated addresses; you can also specify a general register that contains the new address
'+' and '-' on keypad |  | cycle through the selectors: CS, DS, ES, SS, FS and GS
ARROWS UP and DOWN |  | move the cursor up and down
ARROWS LEFT and RIGHT |  | move the cursor left and right
PAGE UP and PAGE DOWN |  | move the cursor one page up or down
HOME |  | move the cursor to the address 0
Stack Window
In this window will be displayed the contents of the stack memory at the addresses specified by the SS:ESP registers.
Key | Action | Description
ESC | Return to CPU | return to the CPU Window
TAB | Next Window | switch to the next window
SHIFT-TAB | Prev Win | switch to the previous window
ALT-X | Exit Debugger | exit to DOS
ARROWS UP and DOWN |  | scroll the contents of the window up and down
HOME |  | move the cursor to SS:[ESP+00] position
Strings Window
In this window will be displayed the contents of the memory pointed to by the registers DS:ESI and ES:EDI. This window cannot be selected and its contents cannot be modified.
FPU Registers Window
This window will show the contents of the Floating Point co-processor. This window cannot be selected and its contents cannot be modified.
Copyright © Supernar Systems, Ltd. 1996-2002 All Rights Reserved.