Gdbinit icon indicating copy to clipboard operation
Gdbinit copied to clipboard

Allow level parameter in frame

Open oriolarcas opened this issue 8 years ago • 4 comments

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

oriolarcas avatar Feb 02 '17 12:02 oriolarcas

Selecting frames via f / frame #num does not work please do not replace build in commands.

ObiWahn avatar Apr 04 '17 09:04 ObiWahn

Since this is what gdbinit does already, this patch fixes this problem.

oriolarcas avatar Apr 05 '17 15:04 oriolarcas

So with your patch:

f 6
l

should work?

ObiWahn avatar Apr 06 '17 19:04 ObiWahn

Yes, "f [frame number]" works with this patch.

oriolarcas avatar Apr 19 '17 15:04 oriolarcas