This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Breakpoint commands in MI mode and "backtrace"
- From: Eli Zaretskii <eliz at gnu dot org>
- To: gdb at sourceware dot org
- Date: Sun, 08 Oct 2017 13:08:33 +0300
- Subject: Breakpoint commands in MI mode and "backtrace"
- Authentication-results: sourceware.org; auth=none
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
There seems to be a problem with execution of "bt" as part of
breakpoint commands in MI mode: the output of "bt" is not shown.
What I did was invoke GDB as "gdb -i=mi PROGRAM", then set a
breakpoint or a watchpoint in that program, and defined the following
as its breakpoint commands:
bt
end
When the breakpoint triggers, I don't see the backtrace.
I tried other commands, like "up" and "print SOME-VARIABLE", and they
do seem to be executed and the output shown. So why doesn't that
happen with "backtrace"? Is it a bug or am I missing something?
(FWIW, I also tried using -break-commands, with a similar result: the
backtrace is not shown when the breakpoint triggers.)
This problem prevents "bt" from being useful in breakpoint commands
when running with the Emacs GDB front-end, which uses MI.
Thanks in advance for any pointers.