This is the mail archive of the 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: [RFC 1/5] Lazy register values

On Fri, Apr 04, 2008 at 09:17:38PM +0200, Ulrich Weigand wrote:
> I like this approach!  However, I'm wondering about some of the
> value_lazy changes; for example in code like:
>   v = allocate_value (elt_type);
>   if (value_lazy (array))
>     set_value_lazy (v, 1);
>   else
>     memcpy (value_contents_writeable (v),
>             value_contents (array) + elt_offs, elt_size);

> (in value_subscripted_rvalue), it doesn't seem right to simply
> change the if to 
>   if (VALUE_LVAL (array) == lval_memory && value_lazy (array))
> If that function were ever called with a lazy register value,
> the "else" part would copy from value_contents of that lazy
> value, which is actually undefined.

I don't think that's what happens - value_contents ->
value_contents_writeable -> value_fetch_lazy.  I figured the fetch at
this point was acceptable; we work hard to avoid fetching memory
because it might be large, but registers are better bounded.
Do you agree, or are the offsets worthwhile after all?

> I've read through the rest of the patches in this series,
> and they look fine to me.  I'd be happy to convert any of
> the platforms I have access to (s390, ppc, spu, ia64).


My plan is to wait until at least next week, in case anyone else
has comments; revise for comments; do as many other platforms as
I can test; and then start checking this in.  I'll fix any other
platforms I'm asked to.  I don't expect any substantial revisions,
in case you feel like getting a head start :-)

Daniel Jacobowitz

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