From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13381 invoked by alias); 8 Dec 2004 01:55:44 -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 12780 invoked from network); 8 Dec 2004 01:55:35 -0000 Received: from unknown (HELO arwen.tausq.org) (64.81.244.109) by sourceware.org with SMTP; 8 Dec 2004 01:55:35 -0000 Received: by arwen.tausq.org (Postfix, from userid 1000) id 9129A6BE3D; Tue, 7 Dec 2004 17:55:32 -0800 (PST) Date: Wed, 08 Dec 2004 03:27:00 -0000 From: Randolph Chung To: gdb-patches@sources.redhat.com Subject: Re: [patch/rfa] allow unwinding "past main" for dummy frames Message-ID: <20041208015532.GH6359@tausq.org> Reply-To: Randolph Chung References: <20041206032726.GB6359@tausq.org> <20041206034013.GA31944@nevyn.them.org> <20041206041458.GF6359@tausq.org> <20041206042736.GA496@nevyn.them.org> <20041206045933.GG6359@tausq.org> <20041206144326.GB14232@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041206144326.GB14232@nevyn.them.org> 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/msg00227.txt.bz2 > Patch is OK, but definitely needs a comment. And the comment should > mention HP/UX specifically. i've checked this in: 2004-12-07 Randolph Chung * frame.c (get_prev_frame): Don't terminate unwinding at main if we are unwinding through a dummy frame. Index: frame.c =================================================================== RCS file: /cvs/src/src/gdb/frame.c,v retrieving revision 1.195 diff -u -p -r1.195 frame.c --- frame.c 10 Nov 2004 23:26:33 -0000 1.195 +++ frame.c 8 Dec 2004 01:54:47 -0000 @@ -1199,7 +1199,18 @@ get_prev_frame (struct frame_info *this_ get_current_frame(). */ gdb_assert (this_frame != NULL); + /* tausq/2004-12-07: Dummy frames are skipped because it doesn't make much + sense to stop unwinding at a dummy frame. One place where a dummy + frame may have an address "inside_main_func" is on HPUX. On HPUX, the + pcsqh register (space register for the instruction at the head of the + instruction queue) cannot be written directly; the only way to set it + is to branch to code that is in the target space. In order to implement + frame dummies on HPUX, the called function is made to jump back to where + the inferior was when the user function was called. If gdb was inside + the main function when we created the dummy frame, the dummy frame will + point inside the main function. */ if (this_frame->level >= 0 + && get_frame_type (this_frame) != DUMMY_FRAME && !backtrace_past_main && inside_main_func (this_frame)) /* Don't unwind past main(). Note, this is done _before_ the -- Randolph Chung Debian GNU/Linux Developer, hppa/ia64 ports http://www.tausq.org/