From: Tom Tromey <tromey@redhat.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: RFA: fix PR gdb/2489
Date: Tue, 03 Feb 2009 01:38:00 -0000 [thread overview]
Message-ID: <m3y6wol2st.fsf@fleche.redhat.com> (raw)
In-Reply-To: <200902030121.48729.pedro@codesourcery.com> (Pedro Alves's message of "Tue\, 3 Feb 2009 01\:21\:47 +0000")
>>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
Pedro> Oh, sorry, I guess I wasn't clear. I meant after the
Pedro> type_name_no_tag call, at the strcmp line.
Oh, you were plenty clear -- I just misunderstood.
Pedro> I mainly asked due to this:
Pedro> /* Return a typename for a struct/union/enum type without "struct ",
Pedro> "union ", or "enum ". If the type has a NULL name, return NULL. */
Pedro> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Pedro> char *
Pedro> type_name_no_tag (const struct type *type)
[...]
Pedro> I don't know if that can happen here. That was also the reason I
Pedro> suggested an annonymous struct/class test.
I looked at the anonymous test struct case and I see:
(top) p type_name
$2 = 0x8fa3f1e "<anonymous struct>"
However, this appears to come from g++:
<2><361>: Abbrev Number: 33 (DW_TAG_structure_type)
<362> DW_AT_name : (indirect string, offset: 0x172): <anonymous struct>
I seem to recall that this is actually a change in g++.
I tried with an older g++ and the dwarf says:
<2><58b>: Abbrev Number: 29 (DW_TAG_structure_type)
DW_AT_sibling : <5ab>
DW_AT_name : ._0
... which just seems weird.
Anyway, I suspect that you are correct, and we could see a NULL here,
but I don't know how to make it happen. I will add a check for NULL
here tomorrow.
Tom
next prev parent reply other threads:[~2009-02-03 1:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-01 19:15 Tom Tromey
2008-10-21 22:25 ` Pedro Alves
2009-02-03 1:02 ` Tom Tromey
2009-02-03 1:10 ` Tom Tromey
2009-02-03 1:20 ` Pedro Alves
2009-02-03 1:38 ` Tom Tromey [this message]
2009-02-03 19:20 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3y6wol2st.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox