From: Daniel Jacobowitz <drow@false.org>
To: Andrew Cagney <cagney@gnu.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [rfc] trad-frame change
Date: Wed, 03 Mar 2004 16:49:00 -0000 [thread overview]
Message-ID: <20040303164933.GB18032@nevyn.them.org> (raw)
In-Reply-To: <40460B28.3000504@gnu.org>
On Wed, Mar 03, 2004 at 11:43:20AM -0500, Andrew Cagney wrote:
> Think of this as a pseudo patch.
>
> I'm looking to extend the trad-frame code so that it includes the interface:
>
> trad_frame_append (gdbarch, frame_type, frame_sniffer, frame_cache);
>
> This would do all the housekeeping necessary to create a FRAME_TYPE
> unwinder implemented with FRAME_SNIFFER and FRAME_CACHE functions. The
> second function would have the interface:
>
> struct trad_frame_cache
> {
> struct frame_id this_id;
> CORE_ADDR this_base;
> struct trad_frame *saved_regs;
> };
>
> void frame_cache (struct frame_info *next_frame, struct
> trad_frame_cache *this_cache);
>
> and would be called _once_ to populate the entire trad-frame cache.
> After that frame ID and register requests would be handled directly.
>
> My rationale is simple. Having just churned out unwinders for two
> architectures I'm seeing a pattern that suggests this would make life
> easier:
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).
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
WARNING: multiple messages have this Message-ID
From: Daniel Jacobowitz <drow@false.org>
To: Andrew Cagney <cagney@gnu.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [rfc] trad-frame change
Date: Fri, 19 Mar 2004 00:09:00 -0000 [thread overview]
Message-ID: <20040303164933.GB18032@nevyn.them.org> (raw)
Message-ID: <20040319000900.9rch1PLVvcQSZydg9Y1EFzWRQw5vi8MHsqSR8RQHKlY@z> (raw)
In-Reply-To: <40460B28.3000504@gnu.org>
On Wed, Mar 03, 2004 at 11:43:20AM -0500, Andrew Cagney wrote:
> Think of this as a pseudo patch.
>
> I'm looking to extend the trad-frame code so that it includes the interface:
>
> trad_frame_append (gdbarch, frame_type, frame_sniffer, frame_cache);
>
> This would do all the housekeeping necessary to create a FRAME_TYPE
> unwinder implemented with FRAME_SNIFFER and FRAME_CACHE functions. The
> second function would have the interface:
>
> struct trad_frame_cache
> {
> struct frame_id this_id;
> CORE_ADDR this_base;
> struct trad_frame *saved_regs;
> };
>
> void frame_cache (struct frame_info *next_frame, struct
> trad_frame_cache *this_cache);
>
> and would be called _once_ to populate the entire trad-frame cache.
> After that frame ID and register requests would be handled directly.
>
> My rationale is simple. Having just churned out unwinders for two
> architectures I'm seeing a pattern that suggests this would make life
> easier:
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).
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2004-03-03 16:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-19 0:09 Andrew Cagney
2004-03-03 16:43 ` Andrew Cagney
2004-03-03 16:49 ` Daniel Jacobowitz [this message]
2004-03-19 0:09 ` Andrew Cagney
2004-03-03 18:34 ` Andrew Cagney
2004-03-19 0:09 ` Daniel Jacobowitz
2004-03-03 18:53 ` Daniel Jacobowitz
2004-03-19 0:09 ` Andrew Cagney
2004-03-03 20:20 ` Andrew Cagney
2004-03-03 20:29 ` Daniel Jacobowitz
2004-03-19 0:09 ` Andrew Cagney
2004-03-03 20:41 ` Andrew Cagney
2004-03-19 0:09 ` Daniel Jacobowitz
2004-03-05 14:52 ` Andrew Cagney
2004-03-19 0:09 ` Andrew Cagney
2004-03-19 0:09 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040303164933.GB18032@nevyn.them.org \
--to=drow@false.org \
--cc=cagney@gnu.org \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox