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.devel Subject: Re: other weird gdb-mi problems Date: Thu, 27 Aug 2009 16:52:58 +1200 Message-ID: <19094.4394.535184.630878@totara.tehura.co.nz> References: <83vdkacx2k.fsf@gnu.org> <19093.50389.972379.110708@totara.tehura.co.nz> <878wh6gh48.fsf@catnip.gol.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 1251353163 8547 80.91.229.12 (27 Aug 2009 06:06:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 27 Aug 2009 06:06:03 +0000 (UTC) Cc: Eli Zaretskii , Dmitry Dzhus , emacs-devel@gnu.org To: Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 27 08:05:55 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MgY7O-0001E0-Pw for ged-emacs-devel@m.gmane.org; Thu, 27 Aug 2009 08:05:55 +0200 Original-Received: from localhost ([127.0.0.1]:33621 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgY7O-0007OO-5c for ged-emacs-devel@m.gmane.org; Thu, 27 Aug 2009 02:05:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MgY7E-0007NH-PS for emacs-devel@gnu.org; Thu, 27 Aug 2009 02:05:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MgY78-0007KZ-FC for emacs-devel@gnu.org; Thu, 27 Aug 2009 02:05:43 -0400 Original-Received: from [199.232.76.173] (port=36915 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgY78-0007KQ-9J for emacs-devel@gnu.org; Thu, 27 Aug 2009 02:05:38 -0400 Original-Received: from viper.snap.net.nz ([202.37.101.25]:49907) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MgY0U-0004Me-5f; Thu, 27 Aug 2009 01:58:46 -0400 Original-Received: from totara (unknown [123.255.30.200]) by viper.snap.net.nz (Postfix) with ESMTP id C05EA3DA6BA; Thu, 27 Aug 2009 16:53:01 +1200 (NZST) Original-Received: by totara (Postfix, from userid 1000) id 89C9DC164; Thu, 27 Aug 2009 16:52:58 +1200 (NZST) In-Reply-To: <878wh6gh48.fsf@catnip.gol.com> X-Mailer: VM 7.19 under Emacs 22.2.1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:114667 Archived-At: > p.s. What about emacs showing the wrong source file? Actually, I take back what I said earlier. Previously, "-stack-info-frame" was actually used to query for the current frame but I see now that after Dmitry's changes it now gets sent as, e.g., "-stack-info-frame --thread 1 -frame --0" which resets the frame. The change below seems to fix this for the problem you reported with "up" and "down" by just specifying the thread, "-stack-info-frame --thread 1" but this might breaks things in a multi-threaded situation where Emacs might want send a GDB command that operates on a different frame to the selected one. Dmitry, what do you think? -- Nick http://www.inet.net.nz/~nickrob *** gdb-mi.el.~1.36.~ 2009-08-25 09:58:16.000000000 +1200 --- gdb-mi.el 2009-08-27 16:35:02.000000000 +1200 *************** then no --frame option is added." *** 1605,1614 **** ;; 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 ! (if (not (or noframe (not gdb-frame-number))) ! (concat " --frame " gdb-frame-number) "") ! " ") command)) (defun gdb-current-context-buffer-name (name) --- 1605,1611 ---- ;; 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)) (defun gdb-current-context-buffer-name (name)