Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: Emi SUZUKI <emi-suzuki@tjsys.co.jp>, gdb-patches@sourceware.org
Subject: Re: [rfc] [2/4] SPU overlay support: The SPU target part
Date: Thu, 10 May 2007 21:55:00 -0000	[thread overview]
Message-ID: <20070510215500.GC3187@caradoc.them.org> (raw)
In-Reply-To: <200705081240.l48CeCFu003316@d12av02.megacenter.de.ibm.com>

On Tue, May 08, 2007 at 02:40:12PM +0200, Ulrich Weigand wrote:
> +  /* The previous SP is equal to the CFA.  */
> +  trad_frame_set_value (info->saved_regs, SPU_SP_REGNUM, info->frame_base);
> +
> +  /* The previous PC comes from the link register.  In the case
> +     of overlay return stubs, we unwind to the real return address.  */
> +  if (trad_frame_addr_p (info->saved_regs, SPU_LR_REGNUM))
> +    target_read_memory (info->saved_regs[SPU_LR_REGNUM].addr, buf, 16);
> +  else
> +    frame_unwind_register (next_frame, SPU_LR_REGNUM, buf);
> +
> +  if (extract_unsigned_integer (buf + 8, 4) != 0)
> +    trad_frame_set_value (info->saved_regs, SPU_PC_REGNUM,
> +			  extract_unsigned_integer (buf + 8, 4));
> +  else
> +    trad_frame_set_value (info->saved_regs, SPU_PC_REGNUM,
> +			  extract_unsigned_integer (buf, 4));

(I'm not sure how this ends up detecting an overlay return stub, but
I'll take your word for it.)

This is clever, but kind of sneaky.  We show signal return trampolines
and dummy call trampolines, so I'm not sure why it's necessary to
hide overlay return stubs.  Do you think this is more useful than
confusing?

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2007-05-10 21:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-07 22:26 Ulrich Weigand
2007-05-08  8:10 ` Emi SUZUKI
2007-05-08 12:40   ` Ulrich Weigand
2007-05-10 21:55     ` Daniel Jacobowitz [this message]
2007-05-10 22:20       ` Ulrich Weigand
2007-05-11 17:32         ` Daniel Jacobowitz
2007-05-11 19:09           ` Ulrich Weigand
2007-05-11 19:33             ` 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=20070510215500.GC3187@caradoc.them.org \
    --to=drow@false.org \
    --cc=emi-suzuki@tjsys.co.jp \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.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