down

The down command moves down in the call stack.

Syntax

down

Usage

The down command moves the focus of the debugger down from the frame currently being examined, to the frame of its callee.

The command selects and prints the function called by the current function.

See stack frames for a brief description of frames.

Example

MAIN
    CALL func1()
END MAIN

FUNCTION func1() RETURNS ()
    DEFINE x INT, s STRING
    CALL func2() RETURNING x, s
END FUNCTION

FUNCTION func2() RETURNS (INT,STRING)
    RETURN 999, "xxxxxx"
END FUNCTION
$ fglcomp -M prog.4gl && fglrun -d prog.42m

(fgldb) break func2
Breakpoint 1 at 0x00000000: file prog.4gl, line 11.

(fgldb) run
Breakpoint 1, func2() at prog.4gl:11
   8     END FUNCTION
   9
   10    FUNCTION func2() RETURNS (INT,STRING)
-> 11        RETURN 999, "xxxxxx"
   12    END FUNCTION
   13

(fgldb) up
#1 func1() at prog.4gl:7
   4
   5     FUNCTION func1() RETURNS ()
   6         DEFINE x INT, s STRING
-> 7         CALL func2() RETURNING x, s
   8     END FUNCTION
   9
   10    FUNCTION func2() RETURNS (INT,STRING)

(fgldb) down
#0 func2() at prog.4gl:11
   8     END FUNCTION
   9
   10    FUNCTION func2() RETURNS (INT,STRING)
-> 11        RETURN 999, "xxxxxx"
   12    END FUNCTION
   13