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 - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

Figure 17. The Memory Window

Use the Memory window or the Stack window to examine memory in raw form.  To
open a Memory window, choose Memory At from the Data menu.  The Enter Memory
Address dialog appears.  Enter the memory address and press Return to see
the Memory window.  You can also use one of the Show/Pointer Memory or
Show/Raw Memory items in a variable window to display the memory associated
with a variable.

The Stack Window always shows the memory at the stack pointer.  It is moved
as your program executes to track the top of the stack.  The stack pointer
location will be at the top of the window.  The location of the BP or EBP
register will also be indicated.  Choose Stack from the Data menu to open
the Stack window.

You can modify memory by double-clicking on a value in the Memory or Stack
window, or by cursoring to it and pressing enter.  You will be prompted for
a new value.

Memory windows allow you to follow data structures in the absence of
debugging information.  The Follow menu items will reposition the memory
window to the address that is found under the cursor.  The Repeat and
Previous items will let you repeat a follow action.  This makes it simple to
follow linked lists.  Press the right mouse button to access the following
pop-up menu items:


Modify
    Modify the value at the selected address.  You will be prompted for a
    new value.  You should enter the value in the same radix as the window
    is currently displaying.  You are not limited to typing constants
    values.  You can enter an arbitrary expression to be used for the new
    value.

Break on Write
    Set a breakpoint to stop execution when the selected value changes.  See
    Breakpoints.

--------


Near Follow
    Displays the memory that the selected memory points to, treating it as a
    near pointer.  The new offset to be displayed will be xxxx where xxxx is
    the word under the cursor.  DGROUP will be used as the segment if it can
    be located.  The program's initial stack segment will be used otherwise.
     When you are debugging a 16-bit or 32-bit application, the appropriate
    word size is used.

Far Follow
    Displays the memory that the selected memory points to, treating it as a
    far pointer.  The new address to be displayed will be the the segment
    and offset found at the cursor location.  Note that pointers are stored
    in memory with the offset value first and the segment value second.

Segment Follow
    Display the segment that the selected memory points to, treating it as a
    segment selector.  The new address to be displayed will be xxxx:0 where
    xxxx is the two byte word under the cursor.

Cursor Follow
    Make the selected position the new starting address in the window.  This
    means that the first byte in the memory window will become the byte that
    the cursor was pointing to.  This is useful for navigating through an
    array when no debugging information is available.

Repeat
    Repeat the previous Follow operation.  The new address that will be used
    is at the same offset relative to the beginning of the window as it was
    in the original Follow operation.  Repeating a pointer or segment follow
    is a linked list traversal.  Repeating a Cursor Follow operation
    advances to the next element in an array.

Previous
    Back out of a Follow or Repeat operation.  This will display the memory
    window you were previously viewing.  Essentially, this undoes a Follow
    operation.  You can back all the way out to the first memory location
    you were examining.

Home
    Undo all Follow and Repeat operations.  This will take you back to the
    very first location window you were examining.  It is equivalent to
    using Previous repeatedly.

--------


Left
    Scroll the window backward through memory by the size of the displayed
    memory items.

Right
    Scroll the window forward through memory by the size of the displayed
    memory items.

--------


Address
    Position the window at a new address.  You will be prompted to type in a
    new address.  You can type an arbitrary expression.  See
    Watcom Debugger Expression Handling.  If you type the name of a
    variable, the address of that variable is used.  If the expression you
    type does not contain a segment value DGROUP will be used as the segment
    if it can be located.  The program's initial stack segment will be used
    otherwise.

Assembly
    Position the assembly window to the address of the memory under the
    cursor.  This is useful if you have incorrectly displayed a pointer as
    data and wish to look at the code instead.

Type/Byte
    Display as hexadecimal bytes.

Type/Word
    Display as hexadecimal 16-bit words.

Type/Dword
    Display as hexadecimal 32-bit words.

Type/Qword
    Display as hexadecimal 64-bit words.

Type/Char
    Display as signed 8-bit integers.

Type/Short
    Display as signed 16-bit integers.

Type/Long
    Display as signed 32-bit integers.

Type/__int64
    Display as signed 64-bit integers.

Type/Unsigned Char
    Display as unsigned 8-bit integers.

Type/Unsigned Short
    Display as unsigned 16-bit integers.

Type/Unsigned Long
    Display as unsigned 32-bit integers.

Type/Unsigned __int64
    Display as unsigned 64-bit integers.

Type/0:16 Pointer
    Display as 16-bit near pointers (16-bit offset).

Type/16:16 Pointer
    Display as 32-bit far pointers (16-bit segment, 16-bit offset).

Type/0:32 Pointer
    Display as 32-bit near pointers (32-bit offset).

Type/16:32 Pointer
    Display as 48-bit far pointers (16-bit segment, 32-bit offset).

Type/Float
    Display as 32-bit floating-point values.

Type/Double
    Display as 64-bit floating-point values.

Type/Extended Float
    Display as 80-bit floating-point values.

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