From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28269 invoked by alias); 11 Nov 2007 07:44:44 -0000 Received: (qmail 28261 invoked by uid 22791); 11 Nov 2007 07:44:44 -0000 X-Spam-Check-By: sourceware.org Received: from romy.inter.net.il (HELO romy.inter.net.il) (213.8.233.24) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 11 Nov 2007 07:44:40 +0000 Received: from HOME-C4E4A596F7 (IGLD-84-229-247-242.inter.net.il [84.229.247.242]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id JJC52544 (AUTH halo1); Sun, 11 Nov 2007 09:44:11 +0200 (IST) Date: Sun, 11 Nov 2007 07:44:00 -0000 Message-Id: From: Eli Zaretskii To: Michael Snyder CC: Stephen.Berman@gmx.net, gdb@sources.redhat.com In-reply-to: <1194763094.16917.278.camel@localhost.localdomain> (message from Michael Snyder on Sat, 10 Nov 2007 22:38:14 -0800) Subject: Re: GDB cannot access memory after Emacs abort Reply-to: Eli Zaretskii References: <87r6j6rvn3.fsf@escher.local.home> <87hcjtllau.fsf@escher.local.home> <1194763094.16917.278.camel@localhost.localdomain> X-IsSubscribed: yes 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 X-SW-Source: 2007-11/txt/msg00084.txt.bz2 > From: Michael Snyder > Cc: gdb@sources.redhat.com > Date: Sat, 10 Nov 2007 22:38:14 -0800 > > Making sure that I understand -- you ran emacs under gdb, > you set a breakpoint at abort, you hit the breakpoint -- The .gdbinit file in the Emacs src directory always sets a breakpoint at `abort', because Emacs calls `abort' when it encounters a ``can't happen'' situation. > > > (gdb) xbacktrace > > OK, I'm not familiar with that command. "xbacktrace"? It's defined in Emacs's src/.gdbinint. I reproduce it below, in case you are interested, but the upshot of all this is that `bt' doesn't work, as shown below: > > > (gdb) bt > > > #0 abort () at emacs.c:431 > > > Cannot access memory at address 0xbfd6836c > > > Cannot access memory at address 0x8321b6c Stack overflow, maybe? define xbacktrace set $bt = backtrace_list while $bt xgettype (*$bt->function) if $type == Lisp_Symbol xprintsym (*$bt->function) printf " (0x%x)\n", *$bt->args else printf "0x%x ", *$bt->function if $type == Lisp_Vectorlike xgetptr (*$bt->function) set $size = ((struct Lisp_Vector *) $ptr)->size output ($size & PVEC_FLAG) ? (enum pvec_type) ($size & PVEC_TYPE_MASK) : $size & ~gdb_array_mark_flag else printf "Lisp type %d", $type end echo \n end set $bt = $bt->next end end document xbacktrace Print a backtrace of Lisp function calls from backtrace_list. Set a breakpoint at Fsignal and call this to see from where an error was signaled. end