This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Breakpoint commands in MI mode and "backtrace"


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]