Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 471
Hind Forsum Avatar asked Sep 10 '16 02:09

Hind Forsum


1 Answers

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).

like image 112
Employed Russian Avatar answered Oct 20 '22 20:10

Employed Russian