Gdbinit
Gdbinit copied to clipboard
Allow level parameter in frame
GDB frame command can simultaneously select the stack level and display the frame.
This patch does the same:
define frame
if $argc == 1
select-frame $arg0
end
info frame
info args
info locals
end
document frame
Syntax: frame <LEVEL>
| Print current stack frame, or the LEVEL stack frame.
end
Selecting frames via f / frame #num does not work please do not replace build in commands.
Since this is what gdbinit does already, this patch fixes this problem.
So with your patch:
f 6
l
should work?
Yes, "f [frame number]" works with this patch.