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 debugger handles two types of expressions. the difference between the http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
The debugger handles two types of expressions.  The difference between the
two types of expressions is quite subtle.  One is called an "expression" and
things operate as you would normally expect.  This type of expression is
used for all "higher" level operations such as adding items to the Watches
window.  The other type is called an "address expression".  It is used
whenever the debugger prompts for an address and in lower level commands
such Examine and Modify.  If the notation for a particular command argument
is <address>, it is an address expression.  If it ends in just "expr" then
it is a normal expression.  The difference between the two forms lies in how
they treat symbol names.  In a normal expression the value of a symbol is
its rvalue, or contents.  In an address expression, the value of a symbol is
(sometimes) its lvalue, or address.

Consider the following case.  You have a symbol sam at offset 100 and the
word at that location contains the value 15.  If you enter sam into the
watches window you expect the value 15 to be printed and since the Watches
window takes a normal expression that is what you get.  Now let us try it
with the Breakpoint dialog.  Enter sam in the address field.  The Breakpoint
dialog uses the result of its expression as the address at which to set a
breakpoint.  The Breakpoint dialog takes an address expression, and an
implicit unary "&" operator is placed in front of symbols.  The debugger has
a set of heuristics that it applies to determine whether it should use the
rvalue or lvalue of a symbol.

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