Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@ges.redhat.com>
To: Elena Zannoni <ezannoni@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA/rfc] blockframe.c: dummy frames unwind and pseudoregs
Date: Thu, 22 Aug 2002 11:35:00 -0000	[thread overview]
Message-ID: <3D652ACB.70209@ges.redhat.com> (raw)
In-Reply-To: <15717.1260.204796.69744@localhost.redhat.com>


> This is because the generic_call_dummy_register_unwind() doesn't deal with
> pseudo registers. It has this comment:
> 
>       /* Return the actual value.  */
>       /* FIXME: cagney/2002-06-26: This should be via the
>          gdbarch_register_read() method so that it, on the fly,
>          constructs either a raw or pseudo register from the raw
>          register cache.  */
>       regcache_raw_read (registers, regnum, bufferp);
> 
> 
> If instead of raw reads I do cooked reads, I don't get the error.  I
> wonder though if, based of the comment, this could be a problem for
> other targets.
> Thoughts?

Two architecture features could cause problems:
- where an architecture has different sized raw and virtual (pre-cursor 
to cooked) registers
- where there are pseudo registers

MIPS has has different sized raw and virtual registers and, suprise!, 
doesn't use the code in question.

That code block definitly needs to read the cooked value.  The only 
potential problem is with:
http://sources.redhat.com/ml/gdb/2002-08/msg00196.html
and there, I think your case adds support to the argument that the dummy 
frame code should save (readonly) cooked values.

Given this, yes, ok.

BTW, don't forget to update the comment :-)

Andrew



> 2002-08-22  Elena Zannoni  <ezannoni@redhat.com>
> 
> 	* blockframe.c (generic_call_dummy_register_unwind): Use
> 	regcache_cooked_read to catch cases in which the variable is
> 	stored in a pseudo register.
> 
> Index: blockframe.c
> ===================================================================
> RCS file: /cvs/uberbaum/gdb/blockframe.c,v
> retrieving revision 1.37
> diff -u -p -r1.37 blockframe.c
> --- blockframe.c	18 Aug 2002 22:40:15 -0000	1.37
> +++ blockframe.c	22 Aug 2002 15:35:27 -0000
> @@ -1406,7 +1406,7 @@ generic_call_dummy_register_unwind (stru
>           gdbarch_register_read() method so that it, on the fly,
>           constructs either a raw or pseudo register from the raw
>           register cache.  */
> -      regcache_raw_read (registers, regnum, bufferp);
> +      regcache_cooked_read (registers, regnum, bufferp);
>      }
>  }
> 



  reply	other threads:[~2002-08-22 18:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-22  8:48 Elena Zannoni
2002-08-22 11:35 ` Andrew Cagney [this message]
2002-08-22 15:28   ` Elena Zannoni

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=3D652ACB.70209@ges.redhat.com \
    --to=ac131313@ges.redhat.com \
    --cc=ezannoni@redhat.com \
    --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