From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.devel Subject: gdb problem Date: Sat, 14 Jun 2008 00:30:34 +0200 Message-ID: <87y759j7cl.fsf@escher.local.home> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1213396264 607 80.91.229.12 (13 Jun 2008 22:31:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Jun 2008 22:31:04 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 14 00:31:48 2008 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 1K7Ho9-0001Tp-36 for ged-emacs-devel@m.gmane.org; Sat, 14 Jun 2008 00:31:45 +0200 Original-Received: from localhost ([127.0.0.1]:48768 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K7HnK-0005dA-Pp for ged-emacs-devel@m.gmane.org; Fri, 13 Jun 2008 18:30:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K7HnF-0005b2-HQ for emacs-devel@gnu.org; Fri, 13 Jun 2008 18:30:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K7HnE-0005aq-1e for emacs-devel@gnu.org; Fri, 13 Jun 2008 18:30:48 -0400 Original-Received: from [199.232.76.173] (port=54786 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K7HnD-0005an-SS for emacs-devel@gnu.org; Fri, 13 Jun 2008 18:30:47 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:36381 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K7HnD-0006yq-JB for emacs-devel@gnu.org; Fri, 13 Jun 2008 18:30:47 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1K7HnB-0000Gy-HB for emacs-devel@gnu.org; Fri, 13 Jun 2008 22:30:45 +0000 Original-Received: from i5387e13f.versanet.de ([83.135.225.63]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 13 Jun 2008 22:30:45 +0000 Original-Received: from stephen.berman by i5387e13f.versanet.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 13 Jun 2008 22:30:45 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 61 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: i5387e13f.versanet.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:99155 Archived-At: I've hit a problem using gdb while debugging emacs, and though it may well be user error and not related to Emacs at all, I hope I can get some help here. I wanted to follow the execution of Fdisplay_buffer in window.c (as it existed prior to its recent reimplementation in lisp). I have an older Emacs source tree under /Users/steve/lib/emacs-cvs-pre-unicode/src and with this as the working directory I started gdb; here's the session: (wd now: /Users/steve/lib/emacs-cvs-pre-unicode/src) steve@escher:/Users/steve/lib/emacs-cvs-pre-unicode/src> gdb ./emacs GNU gdb 6.6.50.20070726-cvs Copyright (C) 2007 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i586-suse-linux"... Using host libthread_db library "/lib/libthread_db.so.1". SIGINT is used by the debugger. Are you sure you want to change it? (y or n) [answered Y; input not from terminal] DISPLAY = :0 TERM = xterm-256color Breakpoint 1 at 0x8109336: file emacs.c, line 432. Breakpoint 2 at 0x81233c9: file sysdep.c, line 1332. (gdb) r -Q Starting program: /Users/steve/lib/emacs-cvs-pre-unicode/src/emacs -Q [Thread debugging using libthread_db enabled] [New Thread 0xb6e928d0 (LWP 12617)] Program received signal SIGTSTP, Stopped (user). [Switching to Thread 0xb6e928d0 (LWP 12617)] 0xffffe410 in __kernel_vsyscall () (gdb) br /Users/steve/lib/emacs-cvs-pre-unicode/src/window.c:3840 Internal: readin window.c pst for `/Users/steve/lib/emacs-cvs-pre-unicode/src/window.c' found when no symtab found. (gdb) br window.c:3840 Breakpoint 3 at 0x8099956: file window.c, line 3840. (gdb) c Continuing. Breakpoint 3, Fdisplay_buffer (buffer=137869892, not_this_window=137636041, frame=137636041) at window.c:3840 warning: Source file is more recent than executable. 3840 p->next = o->next; First, I do not understand the gdb response when I tried to set a breakpoint using an absolute path, but it evidently failed to set the breakpoint. Then I just used the file name and that did set the breakpoint, and when it hit the breakpoint, gdb said it was in Fdisplay_buffer, which is what I wanted, so this seemed to be ok. But the next two lines, the last two listed above, are strange: the warning that the source file is more recent than the executable, and the content of the line at the breakpoint. In fact, this line is from window.c in the directory /Users/steve/cvsroot/emacs/src, which is my source directory of the Emacs CVS trunk (which does not contain Fdisplay_buffer any more). What happened here? And what do I have to do to be able to step through Fdisplay_buffer in the older source code? I'd be grateful for any help. Steve Berman