This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap 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: Problem with 32-bit negative return values


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


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