From 222f0067a9c3ac2954d1c31fce5829efc5fcc16c Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Wed, 20 Mar 2013 10:38:03 -0300 Subject: [PATCH] dwarves_fprintf: Don't ignore virtual data members When computing the size of a class, leave, caused problems in some cases, links to the reports are in the comments. Reported-by: Nicolas Suggested-by: Mark Wielaard Signed-off-by: Arnaldo Carvalho de Melo --- dwarves_fprintf.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/dwarves_fprintf.c b/dwarves_fprintf.c index 23da5b1..14fdc5f 100644 --- a/dwarves_fprintf.c +++ b/dwarves_fprintf.c @@ -1386,10 +1386,17 @@ size_t class__fprintf(struct class *class, const struct cu *cu, ++printed; /* XXX for now just skip these */ - if (tag_pos->tag == DW_TAG_inheritance && - pos->virtuality == DW_VIRTUALITY_virtual) + if (tag_pos->tag == DW_TAG_inheritance) continue; - +#if 0 + /* + * This one was being skipped but caused problems with: + * http://article.gmane.org/gmane.comp.debugging.dwarves/185 + * http://www.spinics.net/lists/dwarves/msg00119.html + */ + if (pos->virtuality == DW_VIRTUALITY_virtual) + continue; +#endif /* * Check if we have to adjust size because bitfields were * combined with previous fields.