JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Studio 12.2: Debugging a Program With dbx
search filter icon
search icon

Document Information

Preface

1.  Getting Started With dbx

2.  Starting dbx

3.  Customizing dbx

4.  Viewing and Navigating To Code

5.  Controlling Program Execution

6.  Setting Breakpoints and Traces

7.  Using the Call Stack

Finding Your Place on the Stack

Walking the Stack and Returning Home

Moving Up and Down the Stack

Moving Up the Stack

Moving Down the Stack

Moving to a Specific Frame

Popping the Call Stack

Hiding Stack Frames

Displaying and Reading a Stack Trace

8.  Evaluating and Displaying Data

9.  Using Runtime Checking

10.  Fixing and Continuing

11.  Debugging Multithreaded Applications

12.  Debugging Child Processes

13.  Debugging OpenMP Programs

14.  Working With Signals

15.  Debugging C++ With dbx

16.  Debugging Fortran Using dbx

17.  Debugging a Java Application With dbx

18.  Debugging at the Machine-Instruction Level

19.  Using dbx With the Korn Shell

20.  Debugging Shared Libraries

A.  Modifying a Program State

B.  Event Management

C.  Command Reference

Index

Chapter 7

Using the Call Stack

This chapter discusses how dbx uses the call stack, and how to use the where command, hide command, unhide command, and pop command when working with the call stack.

In a multithreaded program, these commands operate on the call stack of the current thread. See thread Command for information on how to change the current thread.

The call stack represents all currently active routines, routines that have been called but have not yet returned to their respective caller. A stack frame is a section to the call stack allocated for use by a single function.

Because the call stack grows from higher memory (larger addresses) to lower memory, up means going toward the caller’s frame (and eventually main() or the starting function of the thread) and down means going toward the frame of the called function (and eventually the current function). The frame for the routine executing when the program stopped at a breakpoint, after a single-step, or when a fault occurs and produces a core file, is in lower memory. A caller routine, such as main(), is located in higher memory.

This chapter is organized into the following sections: