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: The ari hits


On Sat, Mar 01, 2003 at 09:03:02PM -0500, Andrew Cagney wrote:
> 
> >>	REGISTER_VIRTUAL_SIZE (...) /* OK */
> >>
> >>(the ``/* OK */'' gags the ARI) and add a comment.
> >>
> >>sorry about this,
> >
> >
> >That makes a lot more sense now, thank you!  I just assumed you were
> >implying the gdbarch_ prefix.
> >
> >Here's another question, though.  frame_register may return a cooked
> >value, but frame_saved_regs_register_unwind uses a buffer of
> >REGISTER_RAW_SIZE.  Is using REGISTER_VIRTUAL_SIZE in core code really
> >safe?
> 
> Hmm, no, sorry.  It's the value_of_register() value_from_register() code 
> that plays with virtual_size, not frame_register() et.al.
> 
> On the bright side, this means that it can use register_size() as that, 
> when given a choice, should return the raw size.

Thanks, that makes sense.  I'll fix up the patch and commit tomorrow.

By the way, in register_size():
  gdb_assert (size == REGISTER_RAW_SIZE (regnum)); /* OK */
  gdb_assert (size == REGISTER_RAW_SIZE (regnum)); /* OK */

They're both OK, but I suspect one of them is wrong anyway :)

-- 
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]