Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom Debugger Guide - the watcom debugger defines a number of symbols which have special meaning. http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
The Watcom Debugger defines a number of symbols which have special meaning.
Each of the registers is designated by a special name.

eax
    32-bit EAX register (32-bit mode only)

ax
    16-bit AX register

al
    8-bit AL register

ah
    8-bit AH register

ebx
    32-bit EBX register (32-bit mode only)

bx
    16-bit BX register

bl
    8-bit BL register

bh
    8-bit BH register

ecx
    32-bit ECX register (32-bit mode only)

cx
    16-bit CX register

cl
    8-bit CL register

ch
    8-bit CH register

edx
    32-bit EDX register (32-bit mode only)

dx
    16-bit DX register

dl
    8-bit DL register

dh
    8-bit DH register

eip
    Instruction pointer register (32-bit mode only)

ip
    Instruction pointer register

esi
    Source index register (32-bit mode only)

si
    Source index register

edi
    Destination index register (32-bit mode only)

di
    Destination index register

esp
    Stack pointer register (32-bit mode only)

sp
    Stack pointer register

ebp
    Base pointer register (32-bit mode only)

bp
    Base pointer register

cs
    Code segment register

ds
    Data segment register

es
    Extra segment register

fs
    Segment register (32-bit mode only)

gs
    Segment register (32-bit mode only)

ss
    Stack segment register

fl
    Flags register

efl
    Flags register (32-bit mode only)

fl.flg_bit_name
    Individual bits in Flags register

          
         flg_bit_name ::= "c" | "p" | "a" | "z" | "s" | "i" | "d" | "o"

efl.flg_bit_name
    Individual bits in Flags register

          
         flg_bit_name ::= "c" | "p" | "a" | "z" | "s" | "i" | "d" | "o"

    The following table lists the full name for each of the flags register
    bits:


    fl.o, efl.o
        overflow flag

    fl.d, efl.d
        direction flag

    fl.i, efl.i
        interrupt flag

    fl.s, efl.s
        sign flag

    fl.z, efl.z
        zero flag

    fl.a, efl.a
        auxiliary carry flag

    fl.p, efl.p
        parity flag

    fl.c, efl.c
        carry flag


st0 - st7
    Numeric Data Processor registers (math coprocessor registers)

cw
    8087 control word (math coprocessor control word)

cw.cw_bit_name
    Individual bits in the control word

          
         cw_bit_name ::= "ic" | "rc" | "pc" | "iem" | "pm" |
                                 "um" | "om" | "zm" | "dm" | "im"

    The following table lists the full name for each of the control word
    bits:

    cw.ic
        infinity control


     0 = projective
     1 = affine

    cw.rc
        rounding control (2 bits)


     00 = round to nearest or even
     01 = round down (towards negative infinity)
     10 = round up (towards positive infinity)
     11 = chop (truncate toward zero)

    cw.pc
        precision control (2 bits)


     00 = 24 bits
     01 = reserved
     10 = 53 bits
     11 = 64 bits

    cw.iem
        interrupt enable mask (8087 only)


     0 = interrupts enabled
     1 = interrupts disabled (masked)
    cw.pm
        precision (inexact result) mask

    cw.um
        underflow mask

    cw.om
        overflow mask

    cw.zm
        zero-divide mask

    cw.dm
        denormalized operand mask

    cw.im
        invalid operand mask


sw
    8087 status word (math coprocessor status word)

sw.sw_bit_name
    Individual bits in the status word

          
         sw_bit_name ::=  "b" | "c3" | "st" | "c2" | "c1" |
                                 "c0" | "es" | "sf" | "pe" | "ue" |
                                 "oe" | "ze" | "de" | "ie"

    The following table lists the full name for each of the status word
    bits:

    sw.b
        busy

    sw.c3
        condition code bit 3

    sw.st
        stack stop pointer (3 bits)


     000 = register 0 is stack top
     001 = register 1 is stack top
     010 = register 2 is stack top
         .
         .
         .
     111 = register 7 is stack top

    sw.c2
        condition code bit 2

    sw.c1
        condition code bit 1

    sw.c0
        condition code bit 0

    sw.es
        error summary (287, 387 only)

    sw.sf
        stack fault (387 only)

    sw.pe
        precision (inexact result) exception

    sw.ue
        underflow exception

    sw.oe
        overflow exception

    sw.ze
        zero-divide exception

    sw.de
        denormalized operand exception

    sw.ie
        invalid operation exception


The debugger permits the manipulation of register contents using any of the
operators described in the following chapter.  By default, these predefined
names are accessed just like any other variables defined by the user or the
application.  Should the situation ever arise where the application defines
a variable whose name conflicts with that of one of these debugger
variables, the module specifier _dbg may be used to resolve the ambiguity.
 For example, if the application defines a variable called cs then _dbg@cs
can be specified to resolve the ambiguity.  The "_dbg@" prefix indicates
that we are referring to a debugger defined symbol rather than an
application defined symbol.

The flags register, the 8087 control word, and the 8087 status word can be
accessed as a whole or by its component status bits.

Example:

     /fl.c=0
     /cw.um=0
     ?sw.oe

In the above example, the "carry" flag is cleared, the 8087 underflow mask
of the control word is cleared, and the 8087 overflow exception bit of the
status word is printed.

The low order bit of the expression result is used to set or clear the
specified flag.

Example:

     fl.c=0x03a6

In the above example, the "carry" flag is cleared since the low order bit of
the result is 0.

The debugger also defines some other special names.


dbg$32
    This debugger symbol represents the mode in which the processor is
    running.

    0
        16-bit mode

    1
        32-bit mode


dbg$bp
    This debugger symbol represents the register pair SS:BP (16-bit mode) or
    SS:EBP (32-bit mode).

    Example:

         ? dbg$bp


dbg$code
    This debugger symbol represents the current code location under
    examination.  The dot address "." is either set to dbg$code or dbg$data,
    depending on whether you were last looking at code or data.

dbg$cpu
    This debugger symbol represents the type of central processing unit
    which is in your personal computer system.

    0
        Intel 8088, 8086 or compatible processor

    1
        Intel 80188, 80186 or compatible processor

    2
        Intel 80286 or compatible processor

    3
        Intel 80386 or compatible processor

    4
        Intel 80486 or compatible processor

    5
        Intel Pentium processor


dbg$ctid
    This debugger symbol represents the identification number of the current
    execution thread.  Under DOS and QNX, the current thread ID is always 1.
     The current execution thread can be selected using the Thread window or
    the Thread command.

dbg$data
    This debugger symbol represents the current data location under
    examination.  The dot address "." is either set to dbg$code or dbg$data,
    depending on whether you were last looking at code or data.

dbg$etid
    This debugger symbol represents the identification number of the thread
    that was executing when the debugger was entered.  Under DOS and QNX,
    the executing thread ID is always 1.

dbg$fpu
    This debugger symbol represents the type of numeric data processor (math
    coprocessor) that is installed in your personal computer system.

    -1
        An 80x87 emulator is installed

    0
        No coprocessor is installed

    1
        An Intel 8087 is installed

    2
        An Intel 80287 is installed

    3
        An Intel 80387 is installed

    4
        An Intel 80486 processor, supporting coprocessor instructions, is
        installed

    5
        An Intel Pentium processor, supporting coprocessor instructions, is
        installed

dbg$ip
    This debugger symbol represents the register pair CS:IP (16-bit mode) or
    CS:EIP (32-bit mode).

    Example:

         ? dbg$ip


dbg$monitor
    This debugger symbol represents the type of monitor adapter which is in
    use.

    0
        IBM Monochrome Adapter

    1
        IBM Colour Graphics Adapter (CGA)

    2
        IBM Enhanced Graphics Adapter (EGA)

    3
        IBM Video Graphics Array (VGA)


dbg$os
    This debugger symbol represents the operating system that is currently
    running the application.

    1
        DOS

    2
        OS/2

    3
        386|DOS-Extender from Phar Lap Software, Inc.

    5
        NetWare 386 from Novell, Inc.

    6
        QNX from QNX Software Systems Ltd.

    7
        DOS/4GW from Tenberry Software, Inc.  (included in the Watcom
        C/C++(32) and Watcom FORTRAN 77/32 packages)

    8
        Windows 3.x from Microsoft Corporation

    10
        Windows NT or Windows 95 from Microsoft Corporation

    11
        AutoCAD from Autodesk, Inc.


dbg$pid
    (OS/2, NetWare 386, QNX, Windows NT, Windows 95 only) This debugger
    symbol contains the process identification value for the program being

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson