[Crash-utility] [PATCH] sial: Oops drilldowntype for bool

Chouinard, Luc Luc.Chouinard at trueposition.com
Tue Mar 2 12:44:03 UTC 2010


Got it.
Yes, this is the proper fix.
Please go ahead and submit it.
Thanks.

        -Luc
 

> -----Original Message-----
> From: Michael Holzheu [mailto:holzheu at linux.vnet.ibm.com] 
> Sent: Tuesday, March 02, 2010 4:32 AM
> To: Chouinard, Luc
> Cc: crash
> Subject: RE: [PATCH] sial: Oops drilldowntype for bool
> 
> Hallo Luc,
> 
> On Mon, 2010-03-01 at 13:48 -0500, Chouinard, Luc wrote:
> > Hi Michael -
> > How did a fundamental bool type (which, if I'm not mistacking, is a 
> > c++
> > type) got into a kernel object?
> 
> I assume that this comes from the C99 datatype "_Bool". This 
> is used in the kernel to define "bool":
> 
> types.h:typedef _Bool			bool;
> 
> crash> whatis bool
> _Bool
> crash> whatis _Bool
> _Bool
> 
> (gdb) print *type->main_type
> $2 = {code = TYPE_CODE_BOOL, flag_unsigned = 1, flag_nosign = 0, ...
>   name = 0x200040d8257 "_Bool", tag_name = 0x0, owner = {objfile =
> 
> > I think that the answer is to map it to TYPE_CODE_CHAR 
> regarless, so 
> > that the size would be properly handled in structs. c++ seems to be 
> > mapping a bool to a char from a size perspective.
> 
> Agreed, so would the following be the correct patch?
> ---
>  extensions/sial.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> --- a/extensions/sial.c
> +++ b/extensions/sial.c
> @@ -292,6 +292,10 @@ int nidx=0;
>  			type=0;
>  		break;
>  
> +		case TYPE_CODE_BOOL:
> +			sial_parsetype("char", t, ref);
> +			type=0;
> +			break;
>  		case TYPE_CODE_UNION: 
>  			sial_type_mkunion(t);
>  			goto label;
> 
> 
> 

Confidentiality Notice: This e-mail (including any attachments) is intended only for the recipients named above. It may contain confidential or privileged information and should not be read, copied or otherwise used by any other person. If you are not a named recipient, please notify the sender of that fact and delete the e-mail from your system.






More information about the Crash-utility mailing list