[Crash-utility] [PATCH] SIAL extension: bitfield handling fixup

Dave Anderson anderson at redhat.com
Tue Oct 21 13:45:56 UTC 2008


Thanks Hedi,

Forwarding to Luc Chouinard for his ACK.

Dave


----- "Hedi Berriche" <hedi at sgi.com> wrote:

> This is a patch from Olaf Weber that fixes a bug in the SIAL extension
> when
> dealing with bitfields.
> 
> Cheers,
> Hedi.
> 
> Signed-off-by: Olaf Weber <olaf at sgi.com>
> Tested-by: Hedi Berriche <hedi at sgi.com>
> 
> --- a/extensions/sial.c	2008-10-14 14:35:40.000000000 +0100
> +++ b/extensions/sial.c	2008-10-21 13:16:39.024057612 +0100
> @@ -363,7 +363,7 @@ int midx;
>  			sial_member_soffset(m, TYPE_FIELD_BITPOS(type, midx)/8);
>  			sial_member_ssize(m, TYPE_FIELD_TYPE(type, midx)->length);
>  			sial_member_snbits(m, TYPE_FIELD_BITSIZE(type, midx));
> -			sial_member_sfbit(m, TYPE_FIELD_BITSIZE(type, midx));
> +			sial_member_sfbit(m, TYPE_FIELD_BITPOS(type, midx)%8);
>  			sial_member_sname(m, TYPE_FIELD_NAME(type, midx));
>  			LASTNUM=midx+1;
>  			return drilldowntype(TYPE_FIELD_TYPE(type, midx), tm);
> --- a/extensions/libsial/sial_type.c	2008-10-14 14:35:40.000000000
> +0100
> +++ b/extensions/libsial/sial_type.c	2008-10-21 13:16:48.823058008
> +0100
> @@ -278,9 +278,6 @@ get_bit_value(ull val, int nbits, int bo
>  	int dosign=0;
>  	int vnbits=size*8;
>  
> -
> -	val = API_GET_UINT64(&val);
> -
>  	/* first get the value_t */
>          if (nbits >= 32) {
>                  int upper_bits = nbits - 32;
> 
> -- 
> Hedi Berriche
> Global Product Support
>




More information about the Crash-utility mailing list