From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28257 invoked by alias); 3 Mar 2004 18:53:22 -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 28229 invoked from network); 3 Mar 2004 18:53:21 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 3 Mar 2004 18:53:21 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1AybUe-00058x-H8; Wed, 03 Mar 2004 13:53:20 -0500 Date: Fri, 19 Mar 2004 00:09:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: [rfc] trad-frame change Message-ID: <20040303185319.GA19699@nevyn.them.org> Mail-Followup-To: Andrew Cagney , gdb-patches@sources.redhat.com References: <40460B28.3000504@gnu.org> <20040303164933.GB18032@nevyn.them.org> <4046252F.7020504@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4046252F.7020504@gnu.org> User-Agent: Mutt/1.5.1i X-SW-Source: 2004-03/txt/msg00052.txt.bz2 On Wed, Mar 03, 2004 at 01:34:23PM -0500, Andrew Cagney wrote: > >Sounds pretty nice to me. For what it's worth, I'm testing a sigtramp > >unwinder on MIPS/Linux that could almost but not quite use this: > > > >+struct mips_prologue_cache > >+{ > >+ /* The stack pointer at the time this frame was created; i.e. the > >+ caller's stack pointer when this function was called. It is used > >+ to identify this frame. */ > >+ CORE_ADDR prev_sp; > >+ > >+ CORE_ADDR tramp_start; > >+ > >+ int kind; > >+ > >+ /* Saved register offsets. */ > >+ struct trad_frame_saved_reg *saved_regs; > >+}; > > > >(so that the frame ID is constant for both instructions of the > >trampoline). > > .. and frame_id_unwind() looks something like: > > frame_id_build (cache->prev_sp, cache->tramp_start)? > > the trad-frame chache instead has the field: > > struct frame_id this_id; > > which is equivalent - the ID being constructed up front. Yes, precisely - I missed seeing this_id in the bit you posted. > What is "kind"? There are four kinds of signal frames on MIPS/Linux that we have to recognize: - o32 sigreturn - o32 rt_sigreturn - n32 rt_sigreturn - n64 rt_sigreturn They're all basically the same but the offsets differ. Kind could be moved out of the cache, I think, since it isn't used after the cache is filled. So I could use your new mechanism after all. What would _really_ be nice would be a way to pass the kind from the sniffer (which really just calls PC_IN_SIGTRAMP) to the frame creation code... not have to read inferior memory to figure out which it is, twice. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28257 invoked by alias); 3 Mar 2004 18:53:22 -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 28229 invoked from network); 3 Mar 2004 18:53:21 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 3 Mar 2004 18:53:21 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1AybUe-00058x-H8; Wed, 03 Mar 2004 13:53:20 -0500 Date: Wed, 03 Mar 2004 18:53:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: [rfc] trad-frame change Message-ID: <20040303185319.GA19699@nevyn.them.org> Mail-Followup-To: Andrew Cagney , gdb-patches@sources.redhat.com References: <40460B28.3000504@gnu.org> <20040303164933.GB18032@nevyn.them.org> <4046252F.7020504@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4046252F.7020504@gnu.org> User-Agent: Mutt/1.5.1i X-SW-Source: 2004-03.o/txt/msg00052.txt Message-ID: <20040303185300.h6XrYb37extGAZGgA2bevjMYzZEYlpI7Gz7A7X_l5t0@z> On Wed, Mar 03, 2004 at 01:34:23PM -0500, Andrew Cagney wrote: > >Sounds pretty nice to me. For what it's worth, I'm testing a sigtramp > >unwinder on MIPS/Linux that could almost but not quite use this: > > > >+struct mips_prologue_cache > >+{ > >+ /* The stack pointer at the time this frame was created; i.e. the > >+ caller's stack pointer when this function was called. It is used > >+ to identify this frame. */ > >+ CORE_ADDR prev_sp; > >+ > >+ CORE_ADDR tramp_start; > >+ > >+ int kind; > >+ > >+ /* Saved register offsets. */ > >+ struct trad_frame_saved_reg *saved_regs; > >+}; > > > >(so that the frame ID is constant for both instructions of the > >trampoline). > > .. and frame_id_unwind() looks something like: > > frame_id_build (cache->prev_sp, cache->tramp_start)? > > the trad-frame chache instead has the field: > > struct frame_id this_id; > > which is equivalent - the ID being constructed up front. Yes, precisely - I missed seeing this_id in the bit you posted. > What is "kind"? There are four kinds of signal frames on MIPS/Linux that we have to recognize: - o32 sigreturn - o32 rt_sigreturn - n32 rt_sigreturn - n64 rt_sigreturn They're all basically the same but the offsets differ. Kind could be moved out of the cache, I think, since it isn't used after the cache is filled. So I could use your new mechanism after all. What would _really_ be nice would be a way to pass the kind from the sniffer (which really just calls PC_IN_SIGTRAMP) to the frame creation code... not have to read inferior memory to figure out which it is, twice. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer