Commit Graph

14 Commits

Author SHA1 Message Date
Arnaldo Carvalho de Melo f086201b9e [DWARVES_REORGANIZE]: Fixup class__fixup_alingment
Subtracting offsets to fill holes in previous fields.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2008-01-12 14:25:28 -02:00
Arnaldo Carvalho de Melo c383a868ca [DWARVES_REORGANIZE]: Adopt class__add_offsets_from and class__fixup_alignment from ctracer
Will be used in pahole when changing the word-size.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2008-01-12 12:26:06 -02:00
Arnaldo Carvalho de Melo 80d6e56e1d [DWARVES_REORGANIZE]: Add a sanity check on class__demote_bitfields
In fact a BRAIN FART ALERT! 8-)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-20 17:55:18 -02:00
Arnaldo Carvalho de Melo 031eea2786 [DWARVES_REORGANIZE]: Fix moving the last member to after a hole
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-11-11 13:45:00 -02:00
Arnaldo Carvalho de Melo 01ec78903e [CLASS_REORGANIZE]: Fix class__find_last_member_of_size
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-10-26 13:28:18 -02:00
Arnaldo Carvalho de Melo 911375f5c5 [LIB]: Introduce type__for_each_data_member
So that we traverse just the data members, mostly in the reorganize code, where
we can't care less where is that the compiler put the base classes in the
layout since we can't influence how the compiler does this, it has only to
respect the layout we specify for the data members.

Well, it may well be the case that the order of the ancestor classes in the
class declaration can influence this, but I haven't checked.

Yes, another C++ism :-)

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-29 14:06:33 -03:00
Arnaldo Carvalho de Melo 4c5dfb4ba7 [REORGANIZE_LIB]: class__reorganize should return void
In the past it was always cloning and doing the reorganization steps on the
clone, now this is done by the caller, so no need to return self.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-29 13:37:52 -03:00
Arnaldo Carvalho de Melo a915e5d50e [REORGANIZE_LIB]: Don't try to reorganize classes without data members
Another chapter in the C++ saga :-)

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-29 13:32:14 -03:00
Arnaldo Carvalho de Melo e59b1ebb05 [LIB]: Support DW_AT_specification in DW_TAG_structure_type tags
C++ uses this, and to cache the result of the lookup at type__name time we need
to pass the cu to class__name and type__name. Big fallout because of that :-\

But now the output is mucho embelished by the humongous strings representing
C++ templates.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-24 18:45:34 -03:00
Arnaldo Carvalho de Melo c1eff2b2ca [LIB]: Introduce class__tags()
Also preparatory for struct namespace.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-24 12:07:41 -03:00
Arnaldo Carvalho de Melo 2f7f49b107 [LIB]: Put infrastructure for type scoping in place
Now it is possible to have types defined inside types.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-23 22:38:29 -03:00
Arnaldo Carvalho de Melo e905635260 [LIB]: Introduce type__last_member
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-23 22:10:50 -03:00
Arnaldo Carvalho de Melo c0cbf4fa94 [LIB]: Introduce type__for_each_member
Will be useful to show that the intent is to traverse just the DW_TAG_member
entries in the type list. Right now there are both DW_TAG_inheritance and
DW_TAG_member entries in the ->members type list. But there will be many more
tags, like enumerations, classes, etc, that are defined inside classes, a C++
feature. This will also help with DW_TAG_namespace support.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-23 21:43:01 -03:00
Arnaldo Carvalho de Melo fbb50fc851 [LIB]: Move class__reorganize & friends to a new lib: libdwarves_reorganize
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-05-07 00:30:02 -03:00