User`s guide
Using Expressions
35
To print the address of line 27 in the source file foo.c (assuming that foo.c
contains source that was used to compile the current object file), enter:
(dbx) print "foo.c" #27
To print the address of line 27 in the source file containing the procedure bar
(assuming that bar is a function in the current object file), enter:
(dbx) print bar #27
Note: A pound sign (#) introduces a comment in a dbx script file. When dbx
sees a pound sign in a script file, it interprets all characters between the
pound sign and the end of the current line as a comment. See “Executing dbx
Scripts” on page 32 for more information on dbx script files. To include the #
operator in a dbx script, use two pound signs (for example, ##27).
Table 5-2 lists the C language operators recognized by dbx.
Note: C does not allow you to use the sizeof operator on bit fields. However,
dbx allows you to enter expressions using thesizeof operator on bit fields; in
these cases, dbx returns the number of bytes in the data type of bit fields
(such as int or unsigned int). The C language “^” exclusive-OR operator is
not supported. Use the dbx “xor” operator instead.
Table 5-3 lists the Pascal operators recognized by dbx.
Table 5-2 C Language Operators Recognized by dbx
Type Operators
Unary ! & + - * sizeof()
Binary % << >> == <= >= != < > & && | || + - * / [ ] -> .
Table 5-3 Pascal Operators Recognized bydbx
Type Operators
Unary not ^ + -
Binary mod = <= >= <> < > and or + - * / div [ ]