dup

Moves up the call stack

Format:

dup [ num-levels ]

Arguments:

num-levels

Number of levels to move up. The default is 1.

Description:

The dup command moves the current stack frame up one or more levels. It also prints the new frame number and function.

Call stack movements are all relative, so dup effectively "moves up" in the call stack. ("Up" is in the direction of main().)

Frame 0 is the most recent--that is, currently executing--frame in the call stack, frame 1 corresponds to the procedure that invoked the currently executing one, and so on. The call stack's depth is increased by one each time a procedure is entered, and decreased by one when it is exited. The effect of dup is to change the context of commands that follow. For example, moving up one level lets you access variables that are local to the procedure that called the current routine.

Each dup command updates the frame location by adding the appropriate number of levels.

The dup command also modifies the current list location to be the current execution location for the new frame, so a subsequent dlist displays the code surrounding this location. Entering dup 2 (while in frame 0) followed by a dlist, for instance, displays source lines centered around the location from which the current routine's parent was invoked. These lines will be in frame 2.

Command alias:

You may find the following alias useful:

Alias
Definition
Meaning
u
{dup}
Moves up the call stack

Examples:

dup

Moves up one level in the call stack. As a result, subsequent dlist commands refer to the procedure that invoked this one. After this command executes, it displays information about the new frame. For example:

1 check_fortran_arrays_ PC=0x10001254,
    FP=0x7fff2ed0 [arrays.F#48]

dfocus p1 u 5

Moves up five levels in the call stack for each thread involved in process 1. If fewer than five levels exist, the CLI moves up as far as it can.

 
 
 
 
support@etnus.com
Copyright © 2001, Etnus, LLC. All rights reserved.
Version 5.0