gdbwhere-clauseframeinfo

In gdb, what's the difference between 'where', 'bt', and 'i frame' commands?


Seems they all print out information about what's the current call frame is, and 'i frame' seems to give a bit more information. But I don't really see the necessity of 'where' command. Is there anything that 'where' command can do while 'bt' or 'i frame' cannot do?

Thanks!


Solution

  • where and bt are exact synonyms and produce exact same output. From the manual:

    The names where and info stack (abbreviated info s) are additional
    aliases for backtrace.
    

    info frame is totally different: it describes current frame, not the call stack.

    I don't really see the necessity of 'where' command

    It's there to make life easier for people who first used another debugger (e.g. dbx).