Dbx 1024 User's Guide Page 60

  • Download
  • Add to my manuals
  • Print
  • Page
    / 158
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 59
46
Chapter 5: Examining and Changing Data
For example, to display the type declaration for the variable i, enter:
(dbx) whatis i
int i;
The following example illustrates the output of whatis for an array of
structures:
(dbx) whatis array
struct list {
struct list* next;
int value;
} array[12];
When you provide a procedure name to whatis, dbx reports the type of the
value returned by the procedure and the types of all arguments to the
procedure:
(dbx) whatis foo
int foo(i)
int i;
(dbx) whatis main
int main(argc, argv)
int argc;
char** argv;
Examining the Stack
Each time your program executes a procedure, the information about where
in the program the call was made from is saved on a stack. The stack also
contains arguments to the procedure and all of the procedure’s local
variables. Each procedure on the stack defines an activation level. Activation
levels can also consist of blocks that define local variables within procedures.
The activation level determines the scope of many dbx commands and
expressions. For example, unless you qualify a variable, as described in
“Qualifying Variable Names” on page 39, dbx assumes that variables you
reference are local to the current activation level.
The most recently called procedure or block is numbered 0. The next active
procedure (the one that called the current procedure) is numbered 1. The last
activation level is always the main program block.
Page view 59
1 2 ... 55 56 57 58 59 60 61 62 63 64 65 ... 157 158

Comments to this Manuals

No comments