From: Tom Tromey <tromey@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: Regression for -gstabs+ [Re: FYI: fix spelling of "delete" in c-exp.y]
Date: Tue, 19 Jun 2012 17:24:00 -0000 [thread overview]
Message-ID: <87zk7zmczu.fsf@fleche.redhat.com> (raw)
In-Reply-To: <877gv3pf4g.fsf@fleche.redhat.com> (Tom Tromey's message of "Tue, 19 Jun 2012 08:09:51 -0600")
>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:
Tom> I'll revert it and figure out a different fix.
Ok, I take that back.
I did some more debugging and I think my fix is correct.
First, abstractly, it does not make sense to try to look up a name with
a trailing space. No such symbol ever exists -- partial symbols have
the argument (and any possible space) stripped, and full symbols have
the arguments.
Second, as noted earlier, psymtab_search_name will not strip this
trailing space. (And why should it? It is invalid.)
Third, the actual failure occurs in value_struct_elt_for_reference,
in the loop over function fields:
if (t_field_name && strcmp (t_field_name, name) == 0)
Here the function field is:
(top-gdb) p t_field_name
$27 = 0x2158539 "operator delete"
But we are searching for:
(top-gdb) p name
$23 = 0x2767c10 "operator delete "
Now, arguably perhaps this spot should use strcmp_iw. However,
strcmp_iw is evil; and secondly, there ought to be no reason to do so,
because the other lookup paths ensure that the search name doesn't have
a trailing space.
I think your earlier patch was correct, but the c-exp.y part was just
not needed.
I couldn't reproduce any crashing failure using -gstabs+ with the
current tree (I tried the two .exp files you mentioned in your original
post).
So in sum, I'm leaving things as they are.
Tom
prev parent reply other threads:[~2012-06-19 17:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-18 20:22 FYI: fix spelling of "delete" in c-exp.y Tom Tromey
2012-06-19 10:49 ` Regression for -gstabs+ [Re: FYI: fix spelling of "delete" in c-exp.y] Jan Kratochvil
2012-06-19 14:10 ` Tom Tromey
2012-06-19 15:05 ` Jan Kratochvil
2012-06-19 17:24 ` Tom Tromey [this message]
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=87zk7zmczu.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.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