This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc 6/8] record disas: omit function names by default
On Fri, 15 Feb 2013 19:20:45 +0100, Eli Zaretskii wrote:
> > record backtrace:
> > Print function names from which instruction in the execution log ran.
>
> Isn't that just a backtrace? If so, I suggest
>
> Print a backtrace starting at the function to which the instruction
> in the log belongs.
That's the problem, the name "backtrace" itself is already a bit confusing.
It is a "backtrace" into history, not into upper frames.
(gdb) record backtrace
_IO_vsnprintf
_IO_vfprintf_internal
strchrnul
_IO_vfprintf_internal
__GI__IO_default_xsputn
You can see _IO_vfprintf_internal called strchrnul which then returned back to
_IO_vfprintf_internal. This is not a real "backtrace".
I was already considering renaming the command as the term is a bit overloaded
in the debugger context.
Maybe "record list-functions"? It is also very similar to the "record list"
command there which lists lines:
(gdb) btrace list 24-34
24 in stdio_file_flush () at ../../../git/gdb/ui-file.c:525-529
25 in ui_file_data () at ../../../git/gdb/ui-file.c:175-180
26 in stdio_file_flush () at ../../../git/gdb/ui-file.c:522-523
27 in gdb_flush () at ../../../git/gdb/ui-file.c:185
While I understand "record list" was trying to match the existing "list"
command I do not find it too intuitive, so maybe "record list-lines"?
Thanks,
Jan