Problem with 32-bit negative return values

Frank Ch. Eigler fche@redhat.com
Tue Oct 10 20:25:00 GMT 2006


Roland McGrath <roland@redhat.com> writes:

> All loc2c-generated fetches use unsigned types of the target object
> size, i.e. uint32_t here.  loc2c just fetches the bits.  Your
> general expression code that uses the fetched value should cast
> appropriately for the signedness and size you want to calculate
> with.

D'oh.  This bug probably affects every access to values of other than
native sizeof(long) bit size.  The loc2c c_translate_fetch/store
functions assign to a given value name (e.g.  THIS->__retvalue).
Instead it seems necessary to use a temporary value, fetch into that,
then emit the needed casting.

- FChE



More information about the Systemtap mailing list