Arnaldo Carvalho de Melo
031b291d9a
Add a copyright notice.
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-10-25 12:49:47 -03:00
Arnaldo Carvalho de Melo
51a8d81527
bitfields, ugh, if you have, say:
...
struct foo {
char c:1;
int b:1;
short a:1;
};
the first byte_size for the first member (c) will be 1, as the "type"
is char, but the compiler combines all of them into a single 4 byte
bitfield, and the '4' only appear when the bit field has type int, in
the above case on the second member.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-10-25 12:46:26 -03:00
Arnaldo Carvalho de Melo
96ef1165ae
Add support for enum printing.
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-10-25 12:42:53 -03:00
Arnaldo Carvalho de Melo
a4e260fc1a
Grr, another fix for bitfields, this time for a sequence of
...
bitfields, i.e. the offset changes from one bitfield to another.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-10-25 12:14:27 -03:00
Arnaldo Carvalho de Melo
e45d94f9de
Fix bitfield accounting, as I was assuming that the first field would be
...
at the 0 offset, but its not, so just look if the last member was in a
bitfield.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-10-25 12:01:18 -03:00
Arnaldo Carvalho de Melo
d4c95e9b49
Remove more dead code, we don't use the srcfile table.
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-10-25 02:55:36 -03:00
Arnaldo Carvalho de Melo
9b15e948e4
Remove dead code
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-10-25 02:42:57 -03:00
Arnaldo Carvalho de Melo
23971435ad
Fix the struct declaration case.
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-10-25 02:37:21 -03:00
Arnaldo Carvalho de Melo
e748ac69c3
Print the diff when the sum of the member sizeofs + the sum of the
...
holes is not equal to the size of the struct:
struct task_struct {
<SNIP>
}; /* sizeof struct: 1312, sum sizeof members: 1279 */
/* BRAIN FART ALERT! 1312 != 1279 + 25(holes), diff = 8 */
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-10-25 01:18:15 -03:00
Arnaldo Carvalho de Melo
99dd25f7f6
More output layout changes, this time for the elusive task_struct
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-10-25 01:04:26 -03:00
Arnaldo Carvalho de Melo
f517a01b6e
Support DW_TAG_volatile_type and DW_TAG_const_type.
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-10-25 00:54:57 -03:00
Arnaldo Carvalho de Melo
668aec0284
Cosmetic, output layout tidyup to have struct sock output perfect,
...
its our supermodel 8)
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-10-25 00:40:06 -03:00
Arnaldo Carvalho de Melo
034dafb614
Handle the case where DW_TAG_subroutine_type has no DW_AT_type, meaning
...
it doesn't have a return value, i.e. it "returns" void.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-10-25 00:27:29 -03:00
Arnaldo Carvalho de Melo
3e4d70ad47
Support bitfields, still not checking if there are bits available at
...
the end of it.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-10-25 00:18:05 -03:00
Arnaldo Carvalho de Melo
d07bbf65fc
Just some output layout changes.
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-10-24 23:28:37 -03:00
Arnaldo Carvalho de Melo
cc701e54a3
Check if the sum of the struct member sizeofs plus the sum of all the holes
...
found is equal to the sizeof of the structure and emit a "BRAIN FART ALERT!" if
this assertion fails, good news is that no such brain farts ocurred so far :-)
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-10-24 23:09:46 -03:00
Arnaldo Carvalho de Melo
00a86e1267
For now don't print the "nameless structs", aka "typedef struct { } foo".
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-10-24 22:45:43 -03:00
Arnaldo Carvalho de Melo
1bbfd30eea
Basic function pointer support, parameter list will come next, using a struct
...
class instance for the DW_TAG_subroutine_type tag and class->members for the
list of DW_TAG_formal_parameter, if any.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-10-24 22:43:33 -03:00
Arnaldo Carvalho de Melo
7246a223a2
Add support for arrays
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-10-24 22:02:51 -03:00
Arnaldo Carvalho de Melo
038d806873
Repository creation.
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-10-24 20:42:39 -03:00