Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Berlin <dan@cgsoftware.com>
To: Daniel Berlin <dan@cgsoftware.com>
Cc: Jason Molenda <jason-swarelist@molenda.com>,
	Michael Snyder <msnyder@cygnus.com>,
	gdb-patches@sources.redhat.com
Subject: Re: [RFA] bug in symtab.c:lookup_block_symbol()'s search method
Date: Mon, 10 Sep 2001 11:52:00 -0000	[thread overview]
Message-ID: <87vgiqswsl.fsf@cgsoftware.com> (raw)
In-Reply-To: <87zo82swwa.fsf@cgsoftware.com>

Daniel Berlin <dan@cgsoftware.com> writes:

> Jason Molenda <jason-swarelist@molenda.com> writes:
>
>> On Mon, Sep 10, 2001 at 11:24:10AM -0700, Michael Snyder wrote:
>>
>>> > +          if (SYMBOL_SOURCE_NAME (sym)[0] > name[0])
>>> > +            {
>>> > +              break;
>>> > +            }
>>> 
>>> If this test works, then wouldn't some sort of strcmp test work too?
>>
>> It is comparing unmangled names, so there may be space chars which
>> are not significant.  I don't know enough about mangling to be
>> confident that I could put a strcmp in here safely.
> You could if they were always mangled, but they aren't.
> The unmangled names need to be strcmp_iw'd.
>
> We use demangled names when doing symbol lookups because it is easier
> to demangle whatever you type in, and look that up, than it is to take
> what you type in, mangle it, and look that up.
>
> *Much* easier.
>
>> out later today and see if the testsuite happens to trip up on it.
>> The SYMBOL_MATCHES_NAME() call used for the actual comparison uses
>> util.c:strcmp_iw, which skips over whitespace.
> Right.
>
>>
>> (On the good news side, when I first started working on this loop,
>> I found that using strcmp() to detect matches produced a number of
>> testsuite regressions, helping to Show Me The Light.)
>
> Your test above isn't quite correct, actually.
> There is a corner case of the first character being a space. I don't
> think this can ever occur in c or C++, no clue about other
> languages.
Oh, and in case it's not clear, the problem with the first char being
space is that in strcmp_iw, we'd ignore that.

>
>>
>> Jason
>
> -- 
> "One time the power went out in my house and I had to use the
> flash on my camera to see my way around.  I made a sandwich and
> took fifty pictures of my face.  The neighbors thought there was
> lightning in my house.
> "-Steven Wright

-- 
""-Steven Wright


  reply	other threads:[~2001-09-10 11:52 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-09  7:48 Jason Molenda
2001-09-10 11:24 ` Michael Snyder
2001-09-10 11:32   ` Jason Molenda
2001-09-10 11:50     ` Daniel Berlin
2001-09-10 11:52       ` Daniel Berlin [this message]
     [not found]       ` <20010910130347.A5628@shell17.ba.best.com>
2001-09-10 14:17         ` Daniel Berlin
2001-09-14  7:53           ` Andrew Cagney
2001-09-14  8:53             ` Daniel Berlin
2001-09-14  9:06             ` Eli Zaretskii
2001-09-14  9:13               ` Jason Molenda
2001-09-14  9:58                 ` Daniel Berlin
2001-09-14 10:55                   ` Eli Zaretskii
2001-09-14 10:52                 ` Eli Zaretskii
2001-09-14 10:59                   ` Daniel Jacobowitz
2001-09-14 11:57                     ` Eli Zaretskii
2001-09-15  0:54                   ` Jason Molenda
2001-09-15  3:43                     ` Eli Zaretskii
2001-09-15  8:01                       ` Daniel Berlin
2001-09-15  9:09                         ` Eli Zaretskii
2001-09-15 12:36                         ` Daniel Jacobowitz
2001-09-15 12:52                       ` Jason Molenda
2001-09-15  7:54                     ` Daniel Berlin
2001-09-15 13:08                       ` Jason Molenda
2001-09-15 13:33                         ` Daniel Berlin
2001-09-15 13:52                           ` Daniel Berlin
2001-09-15 14:02                             ` Jason Molenda
2001-09-15 14:21                               ` Daniel Berlin
2001-09-16  0:15                               ` Eli Zaretskii
2001-09-17 22:56                                 ` Andrew Cagney
2001-09-17 23:12                                   ` Jason Molenda
2001-09-18  6:21                                     ` Daniel Berlin
2001-09-18  7:32                                     ` Andrew Cagney
2001-09-17 23:18                                   ` Daniel Jacobowitz
2001-09-18  4:51                                     ` Eli Zaretskii

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=87vgiqswsl.fsf@cgsoftware.com \
    --to=dan@cgsoftware.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jason-swarelist@molenda.com \
    --cc=msnyder@cygnus.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