Sun Studio 12 Update 1: Debugging a Program With dbx

where Command

The where command prints the call stack.

Native Mode Syntax

where

Print a procedure traceback.

where number

Print the number top frames in the traceback.

where -f number

Start traceback from frame number.

where -fp address_expression

Print traceback as if fp register had address_expression value.

where -h

Include hidden frames.

where -l

Include library name with function name.

where -q

Quick traceback (only function names).

where -v

Verbose traceback (include function args and line info).

where:

number is a number of call stack frames.

Any of the above forms may be combined with a thread or LWP ID to obtain the traceback for the specified entity.

The -fp option is useful when the fp (frame pointer) register is corrupted, in which event dbx cannot reconstruct call stack properly. This option provides a shortcut for testing a value for being the correct fp register value. Once you have identified the correct value has been identified, you can set it with an assign command or lwp command.

Java Mode Syntax

where [thread_id]

Print a method traceback.

where [thread_id] number

Print the number top frames in the traceback.

where -f [thread_id] number

Start traceback from frame number.

where -q [thread_id]

Quick trace back (only method names).

where -v [thread_id]

Verbose traceback (include method arguments and line information).

where:

number is a number of call stack frames.

thread_id is a dbx-style thread ID or the Java thread name specified for the thread.