beautypg.com

6 stack viewing commands, Stack viewing commands – HP gnu source-level debugger 5992-4701 User Manual

Page 258

background image

Table 16-4 Data viewing and modification commands (continued)

Meaning

WDB Equivalent

XDB Command

Print address using specified for-
mat

p/format &expr

p expr?format

Print static members of class

No equivalent

p class::

Inquire what language is used

show language

p $lang

Print value of next/previous
memory location using format

Use x/format command to
obtain initial value, then use x
with no argument to obtain value
of next memory location. To
obtain value of previous memory
location, use "x $_ - 1".

p {+ | -}[\format

Evaluate using the specified
format

set expr, set var expr

pq expr

Determine address using specified
format

No equivalent

pq expr?format

Evaluate static members of class

No equivalent

pq class::

Evaluate next/previous memory
location using format

No equivalent

pq {+ | -}[\format

16.1.6 Stack viewing commands

The GDB concept of the top and bottom of the stack is the opposite of XDB, so the XDB
up is GDB down.

The following table lists the XDB and equivalent WDB commands for viewing the stack
contents:

Table 16-5 Stack viewing commands

Meaning

WDB Equivalent

XDB Command

View procedure one level nearer
outermost frame of stack (higher
number)

up

down

View procedure number levels
nearer outermost frame of stack

up number

down number

Print stack trace to depth

t [depth] (with -xdb)

, bt

[depth]

t [depth]

Print stack trace and show local
vars

T [depth] (with -xdb),
bt full [depth]

T [depth]

View procedure at innermost
frame of stack

frame 0

top

258

XDB to WDB Transition Guide