From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8880 invoked by alias); 25 Feb 2003 16:24:58 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 8854 invoked from network); 25 Feb 2003 16:24:57 -0000 Received: from unknown (HELO kerberos.suse.cz) (195.47.106.10) by 172.16.49.205 with SMTP; 25 Feb 2003 16:24:57 -0000 Received: from chimera.suse.cz (chimera.suse.cz [10.20.0.2]) by kerberos.suse.cz (SuSE SMTP server) with ESMTP id 58C4959D34C; Tue, 25 Feb 2003 17:24:56 +0100 (CET) Received: from suse.cz (naga.suse.cz [10.20.1.16]) by chimera.suse.cz (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id h1PGOu407478; Tue, 25 Feb 2003 17:24:56 +0100 X-Authentication-Warning: chimera.suse.cz: Host naga.suse.cz [10.20.1.16] claimed to be suse.cz Message-ID: <3E5B98D8.3030002@suse.cz> Date: Tue, 25 Feb 2003 16:24:00 -0000 From: Michal Ludvig Organization: SuSE CR User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: cs, cz, en MIME-Version: 1.0 To: Andrew Cagney Cc: GDB Patches Subject: Re: [patch/rfc] Add a sentinel frame References: <3E305670.3020700@redhat.com> <3E48378E.6090007@suse.cz> <3E492953.8010001@redhat.com> <3E52173B.1030800@suse.cz> <3E538770.6070209@redhat.com> In-Reply-To: <3E538770.6070209@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-02/txt/msg00638.txt.bz2 Andrew Cagney wrote: >> Then run mainline GDB on x86-64: >> (gdb) break main >> (gdb) run >> (gdb) print func(1) >> ../../gdb-head/gdb/sentinel-frame.c:102: internal-error: Function >> sentinal_frame_pop called >> A problem internal to GDB has been detected. Further >> debugging may prove unreliable. >> Quit this debugging session? (y or n) >> >> Attached is a backtrace of this failing GDB. >> Any ideas? > > Yes! > >> #6 0x00000000005446d1 in sentinel_frame_pop (frame=0x82c100, >> cache=0x82c130, regcache=0x850610) at >> ../../gdb-head/gdb/sentinel-frame.c:102 > > > At this point GDB is hosed. > > As I mentioned before, popping the sentinal frame is meaningless so the > question is, where did that frame come from. > > A wild guess is that it is trying to pop the dummy frame having finished > the inferior function call. A confirmation is: > > (gdb) break func > (gdb) print func(1) > > It should manage to stop in func, the stack being something like > (assuming bt doesn't also internal error :-): > > (gdb) bt > .... func ... > .... ... > .... main ... Hmm... (gdb) b func Breakpoint 1 at 0x4000040f: file prog.c, line 1. (gdb) bt #0 func (arg=1) at prog.c:1 #1 #2 func (arg=1) at prog.c:1 Cannot access memory at address 0x3320303236383ae0 Ad #2 - I was in main before 'print func(1)', not in func()... > Returning from func(), causing the dummy-frame to be discarded should > then trigger things: > > (gdb) finish > ... barf ... (gdb) fin Run till exit from #0 func (arg=1) at prog.c:1 /ttt/64/src/gdb/sentinel-frame.c:102: internal-error: Function sentinal_frame_pop called [...] Michal Ludvig -- * SuSE CR, s.r.o * mludvig@suse.cz * (+420) 296.545.373 * http://www.suse.cz