Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@redhat.com>
To: David Carlton <carlton@math.stanford.edu>
Cc: gdb-patches@sources.redhat.com, Aidan Skinner <aidan@velvet.net>,
	Elena Zannoni <ezannoni@redhat.com>
Subject: Re: [RFA] delete BLOCK_SHOULD_SORT
Date: Sun, 22 Sep 2002 16:02:00 -0000	[thread overview]
Message-ID: <vt2ptv5k5ha.fsf@zenia.red-bean.com> (raw)
In-Reply-To: <ro1u1knrlkj.fsf@jackfruit.Stanford.EDU>


It looks good to me.

However, before we commit this, I'd really like to know how much worse
it makes mdebug-based targets.  For example, if the test suite starts
timing out a lot after this patch is applied because symbol lookup is
so slow, then I think we need to buildsym-ify mdebugread first.
However backwards we may find them, people are still using mdebug, and
making the test suite unusable would make it impossible for a company
like Red Hat to give them a code drop when they need one.

You'll need to be testing your namespace work on at least one
mdebug-based target anyway, so this shouldn't be much of an additional
burden.

> I think the changes are pretty straightforward, though I'd appreciate
> it if somebody more conversant with ada-lang.c than I am could make
> sure I'm not missing anything with my change there.

I don't know ada-lang.c, but they look mechanically correct to me.

>        top = BLOCK_NSYMS (block);
>        bot = 0;
>        while (bot < top)
>  	{
>  	  sym = BLOCK_SYM (block, bot);
> +	  /* If there is more than one symbol with the right name and
> +	     namespace, we return the first one; I believe it is now
> +	     impossible for us to encounter two symbols with the same
> +	     name and namespace here, because blocks containing
> +	     argument symbols are no longer sorted.  The exception is
> +	     for C++, where multiple functions (cloned constructors /
> +	     destructors, in particular) can have the same demangled
> +	     name.  So if we have a particular mangled name to match,
> +	     try to do so.  */

This comment still refers to sorted blocks.  And the rationale for
believing that it won't encounter two symbols with the right name and
namespace doesn't apply any more: this comment isn't describing code
that deals only with sorted blocks any more.  This is the code which
can encounter duplicates.

(It's odd to talk about "namespaces" (by which the comment means
symtab.h's namespace_enum) and C++ in the same paragraph.  It might be
nice to clarify that while you're at it.)


      parent reply	other threads:[~2002-09-22 23:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-18 15:16 David Carlton
2002-09-18 19:25 ` Daniel Jacobowitz
2002-09-19  1:04 ` Paul N. Hilfinger
2002-09-19  6:29   ` Daniel Jacobowitz
2002-09-19  8:04     ` Andrew Cagney
2002-09-19  9:29   ` David Carlton
2002-09-22 16:02 ` Jim Blandy [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=vt2ptv5k5ha.fsf@zenia.red-bean.com \
    --to=jimb@redhat.com \
    --cc=aidan@velvet.net \
    --cc=carlton@math.stanford.edu \
    --cc=ezannoni@redhat.com \
    --cc=gdb-patches@sources.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