Exit current function with GDB

Those who use Visual Studio will be familiar with the Shift + F11 hotkey , which exits the function, that is, it continues to execute the current function until it returns to its subscriber at what point it stops.

Is there an equivalent in gdb?

+118
gdb
Jul 12 '14 at 11:57
source share
1 answer

You can use the finish command.

finish : continue to work until the function returns after the selected stack frame. Print the return value (if any). This command can be abbreviated as fin .

(see https://sourceware.org/gdb/current/onlinedocs/gdb/Continuing-and-Stepping.html#Continuing-and-Stepping )

+176
Jul 12 '14 at 12:03 on
source share



All Articles