This is the mail archive of the
mailing list for the Archer project.
Re: [python][patch] Pretty printers for anonymous types.
>>>>> "Paul" == Paul Pluzhnikov <email@example.com> writes:
Paul> There is a further complication: when the same source is compiled
Paul> in C++ mode, then the 'TYPE_NAME (type) == NULL' condition is
Paul> always false -- the name is set to "<anonymous struct>" by GCC 4.3.1.
Paul> I think that's somewhat unfortunate :-(
Yeah. This seems like a gcc bug to me.
Perhaps a hack in the TYPE_NAME comparison is appropriate in this
Paul> Given that C/C++ consistency is desirable, but dealing with
Paul> anonymous C++ structs will clearly take a lot more work, should
Paul> I still commit this (with doc update), or file a gdb-archer PR
Paul> in bugzilla?
I think there are three separate questions:
1. How do we want the pretty-printer type lookup to work, in the
abstract? I think your patch addresses this, and your approach seems
reasonable enough -- though maybe we should really just do what
Jeffrey suggested. (I'll follow up there.)
2. How to handle what GCC emits. Even if we get GCC fixed, 4.3 will
remain broken. So it seems to me that we might as well work around
3. How to deal with internal gdb oddities exposed by this approach.
Here I think an archer bug would be fine.