Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: Randolph Chung <randolph@tausq.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch] fallback unwinder for hppa
Date: Fri, 07 May 2004 01:19:00 -0000	[thread overview]
Message-ID: <409A94E3.2050005@gnu.org> (raw)
In-Reply-To: <20040504152410.GL3965@tausq.org>

> +  int pcoqt = (regnum == PCOQ_TAIL_REGNUM);
> +  struct gdbarch *gdbarch = get_frame_arch (next_frame);
> +  int regsize = register_size (gdbarch, PCOQ_HEAD_REGNUM);
> +
> +  if (pcoqt)
> +    regnum = PCOQ_HEAD_REGNUM;
> +
> +  trad_frame_prev_register (next_frame, saved_regs, regnum,
> +                            optimizedp, lvalp, addrp, realnump, valuep);
> +
> +  if (pcoqt)
> +    store_unsigned_integer (valuep, regsize, 
> +		      	    extract_unsigned_integer (valuep, regsize) + 4);
> +}

It should be possible to encode this information directly in the 
saved_regs array.  For instance, near the end, round:

> +  cache->base = frame_unwind_register_unsigned (next_frame, HPPA_SP_REGNUM);
> +
> +  if (trad_frame_addr_p (cache->saved_regs, RP_REGNUM))
> +    {
> +      cache->saved_regs[RP_REGNUM].addr += cache->base;
> +      cache->saved_regs[PCOQ_HEAD_REGNUM] = cache->saved_regs[RP_REGNUM];
> +    }
>    else
>      {
> -      trad_frame_prev_register (next_frame, info->saved_regs, regnum,
> -				optimizedp, lvalp, addrp, realnump, valuep);
> +      ULONGEST rp = frame_unwind_register_unsigned (next_frame, RP_REGNUM);
> +      trad_frame_set_value (cache->saved_regs, PCOQ_HEAD_REGNUM, rp);
>      }
> +

have:

    saved_regs[PCOQ_TAIL_REGNUM] = saved_regs[PCOQ_HEAD_REGNUM]

andrew




  reply	other threads:[~2004-05-07  1:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-04 15:24 Randolph Chung
2004-05-07  1:19 ` Andrew Cagney [this message]
2004-05-07  2:38   ` Randolph Chung
2004-05-07 20:37     ` Andrew Cagney

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=409A94E3.2050005@gnu.org \
    --to=cagney@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=randolph@tausq.org \
    /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