From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32097 invoked by alias); 3 Dec 2004 18:03:30 -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 32018 invoked from network); 3 Dec 2004 18:03:26 -0000 Received: from unknown (HELO arwen.tausq.org) (64.81.244.109) by sourceware.org with SMTP; 3 Dec 2004 18:03:26 -0000 Received: by arwen.tausq.org (Postfix, from userid 1000) id BF2576BDED; Fri, 3 Dec 2004 10:03:24 -0800 (PST) Date: Fri, 03 Dec 2004 18:03:00 -0000 From: Randolph Chung To: Joel Brobecker Cc: gdb-patches@sources.redhat.com Subject: Re: [RFC] Infinite backtraces... Message-ID: <20041203180324.GE6359@tausq.org> Reply-To: Randolph Chung References: <20041202231255.GM994@adacore.com> <20041203024314.GR6359@tausq.org> <20041203025737.GT994@adacore.com> <20041203045252.GU6359@tausq.org> <20041203165430.GC16491@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041203165430.GC16491@adacore.com> X-GPG: for GPG key, see http://www.tausq.org/gpg.txt User-Agent: Mutt/1.5.6+20040722i X-SW-Source: 2004-12/txt/msg00068.txt.bz2 > > yeah, but i would have expected that you should get an error when > > unwinding from 0 ("Cannot find bounds of current function ..."). this > > should automatically stop the backtrace. > > > > would you mind sending me the output of "info reg" frame frame 5 and 6, > > "maint print unwind __pthread_create_system" and "disassemble > > __pthread_create_system"? argh, i was wrong... the stub unwinder handles the case when pc == 0, and then it assumes that the rp doesn't get modified by default. there's also a bug in the outer __pthread_create_system frame; the stub unwinder doesn't set the rp appropriately. can you try the attached patch? it should convert your infinite backtrace into an error ;-) randolph 2004-12-03 Randolph Chung * hppa-tdep.c (hppa_stub_frame_unwind_cache): Set RP appropriately for export stub frames. Index: hppa-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/hppa-tdep.c,v retrieving revision 1.182 diff -u -p -r1.182 hppa-tdep.c --- hppa-tdep.c 23 Nov 2004 21:05:20 -0000 1.182 +++ hppa-tdep.c 3 Dec 2004 17:56:56 -0000 @@ -2119,8 +2120,9 @@ hppa_stub_frame_unwind_cache (struct fra if (u && u->stub_unwind.stub_type == EXPORT) { info->saved_regs[HPPA_PCOQ_HEAD_REGNUM].addr = info->base - 24; + info->saved_regs[HPPA_RP_REGNUM].addr = info->base - 24; return info; } }