aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/acidtypes
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-04-21 02:40:59 +0000
committerrsc <devnull@localhost>2004-04-21 02:40:59 +0000
commit733e9d3977ae9896f94b1f7312b0398ccce19c35 (patch)
treeb22b51aeea1a708efbfcd1f1484c7d49dd5498db /src/cmd/acidtypes
parent79f2723f25b698aabc25d7f7bc6b551b58d3716b (diff)
downloadplan9port-733e9d3977ae9896f94b1f7312b0398ccce19c35.tar.gz
plan9port-733e9d3977ae9896f94b1f7312b0398ccce19c35.tar.bz2
plan9port-733e9d3977ae9896f94b1f7312b0398ccce19c35.zip
Fix bug in typedef guys.
Diffstat (limited to 'src/cmd/acidtypes')
-rw-r--r--src/cmd/acidtypes/dat.h1
-rw-r--r--src/cmd/acidtypes/dwarf.c9
-rw-r--r--src/cmd/acidtypes/type.c2
3 files changed, 10 insertions, 2 deletions
diff --git a/src/cmd/acidtypes/dat.h b/src/cmd/acidtypes/dat.h
index 1ad77714..f6a34647 100644
--- a/src/cmd/acidtypes/dat.h
+++ b/src/cmd/acidtypes/dat.h
@@ -74,6 +74,7 @@ int dwarf2acid(struct Dwarf*, Biobuf*);
int stabs2acid(struct Stab*, Biobuf*);
Type *newtype(void);
+Type *defer(Type*);
char *nameof(Type*, int);
void freetypes(void);
diff --git a/src/cmd/acidtypes/dwarf.c b/src/cmd/acidtypes/dwarf.c
index 3c53e849..05d0b726 100644
--- a/src/cmd/acidtypes/dwarf.c
+++ b/src/cmd/acidtypes/dwarf.c
@@ -113,7 +113,6 @@ ds2acid(Dwarf *d, DwarfSym *s, Biobuf *b, char *fn)
t->sub = typebynum(s->attrs.type, 0);
break;
-
case TagConstType:
case TagVolatileType:
t = xnewtype(Defer, s);
@@ -175,6 +174,14 @@ ds2acid(Dwarf *d, DwarfSym *s, Biobuf *b, char *fn)
t->n++;
}
break;
+
+ case TagFormalParameter:
+ case TagVariable:
+fprint(2, "var %s %lud\n", s->attrs.name, (ulong)s->attrs.type);
+ if(s->attrs.name==nil || s->attrs.type==0)
+ break;
+ addsymx(fn, s->attrs.name, typebynum(s->attrs.type, 0));
+ break;
}
}
diff --git a/src/cmd/acidtypes/type.c b/src/cmd/acidtypes/type.c
index 872c38b3..c9e8431e 100644
--- a/src/cmd/acidtypes/type.c
+++ b/src/cmd/acidtypes/type.c
@@ -165,7 +165,7 @@ renumber(TypeList *tl, uint n1)
}
}
-static Type*
+Type*
defer(Type *t)
{
Type *u, *oldt;