This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 3/4] Remove TYPE_TAG_NAME
>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:
>> + /* If we have "typedef struct foo {. . .} bar;" do we want to
>> + print it as "struct foo" or as "bar"? Pick the latter for
>> + C++, because C++ folk tend to expect things like "class5
>> + *foo" rather than "struct class5 *foo". */
>> + if (language == language_c || language == language_minimal)
Keith> I'm almost afraid to ask, but why was language_minimal necessary here?
Keith> A small comment might be appropriate?
Keith> [I think I can already guess the heinous reason...] Do you know if
Keith> there is a test case that specifically covers this block with
Keith> language_minimal?
I think in this case, I added language_minimal on the theory that it is
"C-like". I don't think there's a test case.
I can add a comment, and a test case wouldn't be too hard either.
Keith> Good riddance! I never did understand the "except by poorly
Keith> designed C++ code" comment.
Haha, me neither. I always considered it a critique of some other code
elsewhere in gdb (perhaps long since removed) but who knows.
>> gdb_test "ptype \$structreg" \
>> "type = struct struct1 {\r\n *v4int8 v4;\r\n *v2int16 v2;\r\n}"
Keith> <rhetorical>Was the tag name never printed until now?</rhetorical> Wow!
Maybe I should have investigated this one more deeply?
I dunno. The change seemed to make sense to me so I just moved on.
Tom