aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-11-03 12:40:08 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:03:56 -0700
commit19da63710dc5cee1e0282e2f902753d8d1f64bdf (patch)
tree18636f980353e9c9622aad1d49ea7092ae7139be /show-parse.c
parentMake bitfield assignment type evaluation aware of the bit offset. (diff)
downloadsparse-19da63710dc5cee1e0282e2f902753d8d1f64bdf.tar.gz
sparse-19da63710dc5cee1e0282e2f902753d8d1f64bdf.tar.bz2
sparse-19da63710dc5cee1e0282e2f902753d8d1f64bdf.zip
Remove "fieldwidth" member of struct symbol
It's always the same as bit_size now, and having it just confuses things. We now check whether we have examined a type by looking at the "examined" bitfield, which allows us to set bit_size in the early parsing phase.
Diffstat (limited to 'show-parse.c')
-rw-r--r--show-parse.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/show-parse.c b/show-parse.c
index e7d5773..72d00e3 100644
--- a/show-parse.c
+++ b/show-parse.c
@@ -111,9 +111,7 @@ const char *modifier_string(unsigned long mod)
void show_struct_member(struct symbol *sym)
{
- printf("\t%s:%d:%ld at offset %ld", show_ident(sym->ident), sym->bit_size, sym->ctype.alignment, sym->offset);
- if (sym->fieldwidth)
- printf("[%d..%d]", sym->bit_offset, sym->bit_offset+sym->fieldwidth-1);
+ printf("\t%s:%d:%ld at offset %ld.%d", show_ident(sym->ident), sym->bit_size, sym->ctype.alignment, sym->offset, sym->bit_offset);
printf("\n");
}
@@ -236,7 +234,7 @@ static void do_show_type(struct symbol *sym, struct type_name *name)
break;
case SYM_BITFIELD:
- append(name, ":%d", sym->fieldwidth);
+ append(name, ":%d", sym->bit_size);
break;
case SYM_LABEL: