From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25340 invoked by alias); 8 Oct 2017 10:08:44 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 25330 invoked by uid 89); 8 Oct 2017 10:08:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_20,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:sk:cable.0, H*r:sk:gdb@sou, Emacs, H*r:4.82 X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 08 Oct 2017 10:08:42 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e18Vh-0004C0-Bf for gdb@sourceware.org; Sun, 08 Oct 2017 06:08:41 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e18Vh-0004Bw-85 for gdb@sourceware.org; Sun, 08 Oct 2017 06:08:37 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3664 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e18Vg-00055F-MV for gdb@sourceware.org; Sun, 08 Oct 2017 06:08:37 -0400 Date: Sun, 08 Oct 2017 10:08:00 -0000 Message-Id: <8360bqt0im.fsf@gnu.org> From: Eli Zaretskii To: gdb@sourceware.org Subject: Breakpoint commands in MI mode and "backtrace" Reply-to: Eli Zaretskii X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-IsSubscribed: yes X-SW-Source: 2017-10/txt/msg00020.txt.bz2 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.