This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch/rfc] Add frame_read_signed/unsigned_register(); convert h8300 to print_registers_info()


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]