From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: nickrob@snap.net.nz (Nick Roberts) Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#4519: 23.1.50; GDB MI problems: mi_cmd_stack_info_frame: No arguments required Date: Wed, 23 Sep 2009 22:54:27 +1200 Message-ID: <19129.65123.262702.16487@totara.tehura.co.nz> References: Reply-To: Nick Roberts , 4519@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1253706068 4256 80.91.229.12 (23 Sep 2009 11:41:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Sep 2009 11:41:08 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org To: Michael Welsh Duggan , 4519@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 23 13:41:00 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MqQCE-0000KP-Cv for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Sep 2009 13:39:42 +0200 Original-Received: from localhost ([127.0.0.1]:47109 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqQCD-0001nI-SQ for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Sep 2009 07:39:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MqPgn-0006KK-Al for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2009 07:07:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MqPgh-0006I1-My for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2009 07:07:11 -0400 Original-Received: from [199.232.76.173] (port=51435 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqPgg-0006Hj-R9 for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2009 07:07:07 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:58238) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MqPgg-0007Ow-2S for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2009 07:07:06 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8NB73Ol010618; Wed, 23 Sep 2009 04:07:04 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n8NB03RY008875; Wed, 23 Sep 2009 04:00:03 -0700 Resent-Date: Wed, 23 Sep 2009 04:00:03 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: nickrob@snap.net.nz (Nick Roberts) Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Wed, 23 Sep 2009 11:00:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4519 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4519-submit@emacsbugs.donarmstrong.com id=B4519.12537032778127 (code B ref 4519); Wed, 23 Sep 2009 11:00:03 +0000 Original-Received: (at 4519) by emacsbugs.donarmstrong.com; 23 Sep 2009 10:54:37 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from viper.snap.net.nz (viper.snap.net.nz [202.37.101.25]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8NAsZek008124 for <4519@emacsbugs.donarmstrong.com>; Wed, 23 Sep 2009 03:54:36 -0700 Original-Received: from totara (136.60.255.123.dynamic.snap.net.nz [123.255.60.136]) by viper.snap.net.nz (Postfix) with ESMTP id 738113DA90A; Wed, 23 Sep 2009 22:54:29 +1200 (NZST) Original-Received: by totara (Postfix, from userid 1000) id 484D2C167; Wed, 23 Sep 2009 22:54:27 +1200 (NZST) In-Reply-To: X-Mailer: VM 7.19 under Emacs 22.2.1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Wed, 23 Sep 2009 07:07:11 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:31399 gmane.emacs.pretest.bugs:25077 Archived-At: Michael Welsh Duggan writes: > Please describe exactly what actions triggered the bug > and the precise symptoms of the bug: > > When running gdb via M-x gdb on some code of mine, I end up in a state > where it becomes no longer responsive to 'C-c C-s' or 'C-c C-n' > commands. > > More specifically, I started running gdb by typing M-x gdb. Arguments > were: > gdb -i=mi /home/mwd/bin/rwcut > > >From here I typed "start --python-file /tmp/foo.py --help", and then > stepped through my code using 'C-c C-s' and 'C-c C-n'. At one point, > after 'C-c C-n', where a library was being dynamically loaded, I get the > following output in my *gdb-rwcut* buffer: > > [Thread debugging using libthread_db enabled] > [New Thread 0xb7f786c0 (LWP 5633)] > (gdb) mi_cmd_stack_info_frame: No arguments required Does the patch below fix the immediate problem? You appear to be debugging a multi-threaded program with GDB 6.8. The thread buffer won't work in this case as it uses the MI -thread-info command which is part of GDB 7.0. This is due to be released in the next week or so. Emacs 23.1 probably works better with GDB 6.8, at least for multi-threaded applications. -- Nick http://users.snap.net.nz/~nickrob *** gdb-mi.el.~1.49~ 2009-09-18 15:10:58.000000000 +1200 --- gdb-mi.el 2009-09-23 22:53:36.000000000 +1200 *************** Emacs can't find.") *** 218,223 **** --- 218,224 ---- (defvar gdb-source-window nil) (defvar gdb-inferior-status nil) (defvar gdb-continuation nil) + (defvar gdb-version nil) (defvar gdb-filter-output nil "Message to be shown in GUD console. *************** If NOALL is t, always add --thread optio *** 571,579 **** When `gdb-non-stop' is nil, return COMMAND unchanged." (if gdb-non-stop (if (and gdb-gud-control-all-threads ! (not noall)) (concat command " --all ") ! (gdb-current-context-command command t)) command)) (defmacro gdb-gud-context-call (cmd1 &optional cmd2 noall noarg) --- 572,581 ---- When `gdb-non-stop' is nil, return COMMAND unchanged." (if gdb-non-stop (if (and gdb-gud-control-all-threads ! (not noall) ! (string-equal gdb-version "7.0+")) (concat command " --all ") ! (gdb-current-context-command command)) command)) (defmacro gdb-gud-context-call (cmd1 &optional cmd2 noall noarg) *************** detailed description of this mode. *** 820,826 **** (if (re-search-forward "No symbol" nil t) (progn (message "This version of GDB doesn't support non-stop mode. Turning it off.") ! (setq gdb-non-stop nil)) (gdb-input (list "-gdb-set target-async 1" 'ignore)) (gdb-input (list "-enable-pretty-printing" 'ignore)))) --- 822,830 ---- (if (re-search-forward "No symbol" nil t) (progn (message "This version of GDB doesn't support non-stop mode. Turning it off.") ! (setq gdb-non-stop nil) ! (setq gdb-version "pre-7.0")) ! (setq gdb-version "7.0+") (gdb-input (list "-gdb-set target-async 1" 'ignore)) (gdb-input (list "-enable-pretty-printing" 'ignore)))) *************** static char *magick[] = { *** 1629,1644 **** (concat (car item) "\n"))) ;; NOFRAME is used for gud execution control commands ! (defun gdb-current-context-command (command &optional noframe) ! "Add --thread and --frame options to gdb COMMAND. ! ! Option values are taken from `gdb-thread-number' and ! `gdb-frame-number'. If `gdb-thread-number' is nil, COMMAND is ! returned unchanged. If `gdb-frame-number' is nil of NOFRAME is t, ! then no --frame option is added." ! ;; gdb-frame-number may be nil while gdb-thread-number is non-nil ! ;; (when current thread is running) ! (if gdb-thread-number (concat command " --thread " gdb-thread-number) command)) --- 1633,1642 ---- (concat (car item) "\n"))) ;; NOFRAME is used for gud execution control commands ! (defun gdb-current-context-command (command) ! "Add --thread to gdb COMMAND when needed." ! (if (and gdb-thread-number ! (string-equal gdb-version "7.0+")) (concat command " --thread " gdb-thread-number) command)) *************** current thread and update GDB buffers." *** 1920,1926 **** ;; thread (when (not gdb-register-names) (gdb-input ! (list (concat "-data-list-register-names --thread " thread-id) 'gdb-register-names-handler))) ;;; Don't set gud-last-frame here as it's currently done in gdb-frame-handler --- 1918,1926 ---- ;; thread (when (not gdb-register-names) (gdb-input ! (list (concat "-data-list-register-names" ! (if (string-equal gdb-version "7.0+") ! (concat" --thread " thread-id))) 'gdb-register-names-handler))) ;;; Don't set gud-last-frame here as it's currently done in gdb-frame-handler *************** corresponding to the mode line clicked." *** 2565,2571 **** "Display GDB threads in a new frame.") (def-gdb-trigger-and-handler ! gdb-invalidate-threads (gdb-current-context-command "-thread-info" gud-running) gdb-thread-list-handler gdb-thread-list-handler-custom '(start update update-threads)) --- 2565,2571 ---- "Display GDB threads in a new frame.") (def-gdb-trigger-and-handler ! gdb-invalidate-threads (gdb-current-context-command "-thread-info") gdb-thread-list-handler gdb-thread-list-handler-custom '(start update update-threads))