This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch/rfc] Add frame_read_signed/unsigned_register(); convert h8300 to print_registers_info()
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 23 Oct 2002 11:21:53 -0400
- Subject: Re: [patch/rfc] Add frame_read_signed/unsigned_register(); convert h8300 to print_registers_info()
- References: <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