[CLASSES]: Make class_member__print just print the member

Not printing the identation neither the newline, so that in the next csets
it'll be possible to show members that cross cacheline boundaries and also do
multiple levels of identation when we start supporting classes within classes
printing, to properly support C++.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2006-12-06 15:00:48 -02:00
parent 2e0b628f16
commit 441d9e0d5c
1 changed files with 5 additions and 3 deletions

View File

@ -512,7 +512,7 @@ static uint64_t class_member__print(struct class_member *self)
size = class_member__names(self, class_name, sizeof(class_name),
member_name, sizeof(member_name));
printf(" %-26s %-21s /* %5llu %5llu */\n",
printf("%-26s %-21s /* %5llu %5llu */",
class_name, member_name, self->offset, size);
return size;
}
@ -918,9 +918,11 @@ static void class__print_struct(struct class *self)
list_for_each_entry(pos, &self->members, tag.node) {
if (sum > 0 && last_size > 0 && sum % cacheline_size == 0)
printf(" /* ---------- cacheline "
"%lu boundary ---------- */\n",
sum / cacheline_size);
"%lu boundary ---------- */\n",
sum / cacheline_size);
fputs(" ", stdout);
size = class_member__print(pos);
putchar('\n');
if (pos->hole > 0) {
printf("\n /* XXX %d bytes hole, "
"try to pack */\n\n", pos->hole);