Skip to contentSkip to conversation

Enhance debug information.

PATCH Applied Christopher Li 2 participants 2 messages Jan 17, 2007 – Jan 27, 2007 Sparse checker

lore
Share & tools
lore

Christopher Li

author maintainer
#0 lore raw

PATCH 1/1 Enhance debug information.

I found it very useful for debug_symbol to show the builtin type name.

symbol.h +2 -0
Index: sparse/symbol.h
===================================================================
@@ -239,6 +239,8 @@ extern void bind_symbol(struct symbol *,
 extern struct symbol *examine_symbol_type(struct symbol *);
 extern void examine_simple_symbol_type(struct symbol *);
 extern const char *show_typename(struct symbol *sym);
+extern const char* builtin_typename(struct symbol *sym);
+extern const char* builtin_ctypename(struct ctype *ctype);
 
 extern void debug_symbol(struct symbol *);
 extern void merge_type(struct symbol *sym, struct symbol *base_type);
show-parse.c +67 -45

138 lines not on this page · raw message

#1 lore raw
Quoted 2 lines · Christopher Li

I found it very useful for debug_symbol to show the builtin type name.

Applied, with one minor style fix noted below.

symbol.h extern void bind_symbol(struct symbol *, · line 243

Quoted 12 lines

Index: sparse/symbol.h
===================================================================

symbol.h +2 -0
@@ -239,6 +239,8 @@ extern void bind_symbol(struct symbol *,
 extern struct symbol *examine_symbol_type(struct symbol *);
 extern void examine_simple_symbol_type(struct symbol *);
 extern const char *show_typename(struct symbol *sym);
+extern const char* builtin_typename(struct symbol *sym);
+extern const char* builtin_ctypename(struct ctype *ctype);

The * goes next to the name, not the type:
...char *builtin_..., not ...char* builtin_...

(The same issue applied to the definition of these two functions as well.)

- Josh Triplett