Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [patch/rfc] Add frame_read_signed/unsigned_register(); convert h8300 to print_registers_info()
Date: Wed, 23 Oct 2002 08:21:00 -0000	[thread overview]
Message-ID: <20021023152153.GA9628@nevyn.them.org> (raw)
In-Reply-To: <3DB610B9.5040906@redhat.com>

On Tue, Oct 22, 2002 at 11:00:09PM -0400, Andrew Cagney wrote:
> Hmm,
> 
> (I think I might split this in two)

Looks like a good idea.

> 
> The attached adds the methods:
> 
> +extern void frame_read_signed_register (struct frame_info *frame,
> +                                       int regnum, LONGEST *val);
> +extern void frame_read_unsigned_register (struct frame_info *frame,
> +                                         int regnum, ULONGEST *val);
> 
> These correspond to the frame_unwind_XXXX methods() except that they 
> return the value of a register in THIS frame rather than the value of 
> the register in the PREVIOUS frame.
> 
> They are simply convenience functions to make it easier to obtain a 
> specified frame's register value.
> 
> Thoughts?

I think it's a great idea.  One thought...

>  void
> +frame_read_unsigned_register (struct frame_info *frame, int regnum,
> +			      ULONGEST *val)
> +{
> +  frame_unwind_unsigned_register (get_next_frame (frame), regnum, val);
> +}

So, the register belonging to this frame.  That means the register
which would be in the hardware registers if this frame were current,
right?  Should we allow NULL to imply the current frame?


-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2002-10-23 15:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-22 20:00 Andrew Cagney
2002-10-23  8:21 ` Daniel Jacobowitz [this message]
2002-10-23  9:48   ` NULL selected/current frame; Was: " Andrew Cagney
2002-10-23  9:50     ` Daniel Jacobowitz
2002-10-31 12:11 ` [patch/rfc] Add frame_read_signed/unsigned_register() Andrew Cagney
2002-10-31 12:24 ` [patch] Convert h8300 to print_registers_info() 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=20021023152153.GA9628@nevyn.them.org \
    --to=drow@mvista.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