Bai, those code paths have been fine tuned based on my limited
understanding of the gdb type information layout. You cannot use a 'fall
through' in this switch. It's a one to one match test.
What's behind your question? Are you having problems with a script
and/or symbol/type resolution? If so, send us/me a test case.
Luc
On Thu, 2008-01-10 at 17:01 +0800, baiwd wrote:
> Hi:
> I found some codes like
> case TYPE_CODE_ENUM: if(sial_is_enum(ctype)) goto match; break;
> I wonder that whether it would be better if these codes could be
> changed as
> following:
>
> Signed-off-by: Bai Weidong <[EMAIL PROTECTED]>
>
> --- crash-4.0-4.12/extensions/sial.c 2007-12-13 02:48:09.000000000 +0800
> +++ crash-4.0-4.12/extensions/sial.new.c 2008-01-10 16:47:15.000000000
> +0800
> @@ -155,10 +155,10 @@ apigetctype(int ctype, char *name, TYPE_
> if(sial_is_typedef(ctype) && v) goto match;
> switch(TYPE_CODE(type)) {
> case TYPE_CODE_TYPEDEF: case TYPE_CODE_INT:
> - if(sial_is_typedef(ctype)) goto match;
> break;
> - case TYPE_CODE_ENUM: if(sial_is_enum(ctype)) goto match;
> break;
> - case TYPE_CODE_STRUCT: if(sial_is_struct(ctype)) goto match;
> break;
> - case TYPE_CODE_UNION: if(sial_is_union(ctype)) goto match;
> break;
> + if(sial_is_typedef(ctype)) goto match;
> + case TYPE_CODE_ENUM: if(sial_is_enum(ctype)) goto match;
> + case TYPE_CODE_STRUCT: if(sial_is_struct(ctype)) goto match;
> + case TYPE_CODE_UNION: if(sial_is_union(ctype)) goto match;
> }
> sial_dbg_named(DBG_TYPE, name, 2, "Found but no match.\n");
> }
>
> Best Regards
> Bai Weidong
>
> --
> Crash-utility mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/crash-utility
>
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.
--
Crash-utility mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/crash-utility