"Steplast is not meaningful for the current line."

For example,

(gdb) 4 int k = 10; (gdb) sl ---> alias to "steplast" command error: Steplast is not meaningful for the current line

To execute the steplast command in C++ compiled applications, you must compile the application using the HP aC++ version A.03.50 or later with the -g0 option.

In C++, the steplast command is helpful while debugging heavy templated functions, because it directly steps into the call, thus skipping the constructor calls, if any. This behavior is unlike the step command that steps into the constructor itself.

Consider the following example:

void call_me ( string s ) ... (gdb) 10

call_me ( "hello" );

(gdb) steplast call_me (s=static npos = 4294967295,

static nullref = ref_hdr = mutex_= dummy1 = 0x7f4f79e0, dummy2 = 2136325568, refs_ = 2136327612,

capacity_ = 2136327468, nchars_ = 2136327464, eos_char = 64 '@', alloc_ = <No data fields>,

value_allocator = alloc_ = 0x7f7f133c, data_ = 0x40003a64 "hello") at str.C:55 printf ("Will just print the value of \n");

If there are multiple top-level calls, the steplast command enables you to step into each top-level call. For example, for the following line, the steplast command takes you to the first top-level call, (foo()):

foo(bar()) + bar(foo());

Debug foo(), use the finish command to exit from the first top-level call, (foo()), execute the steplast command to step into the next top-level call, (bar()). The following example illustrates the use of steplast command:

(gdb)10 foo( bar() ) + bar( foo() ) (gdb) sl Use the steplast (sl) command to step

14.28 Getting information from a non-debug executable

You can get some information about the arguments passed to the functions displayed in the stack trace in a non-debug, optimized executable.

When GDB has no debug information; it does not know where the arguments are located or even the type of the arguments. GDB cannot infer this in an optimized, non-debug executable.

However, for integer arguments you can nd the first few parameters for the top-of- stack frame by looking at the registers. On PA-RISC systems, the first parameter will be in $r26, the second in $r25, and so on. On IPF systems, the first few parameters will be in $gr32 and $gr33.

226 HP-UX Configuration-Specific Information

Page 226
Image 226
HP gnu source-level debugger 5992-4701 manual Getting information from a non-debug executable, For example