On Tue, May 22, 2012 at 10:19 AM, Jason Merrill <ja...@redhat.com> wrote:

I'll let Cary handle the other questions.

> Yes, I agree that we want to put "some_function" in pubnames.  I still don't
> see how putting the anonymous namespace itself in pubnames helps at all.  As
> far as pubnames is concerned, the anonymous namespace should be transparent,
> and "some_function" should appear unqualified.

Anonymous namespaces are funky in general, but gdb would like to be
able to do things like tab completion on:

(gdb) b '(anonymous namespace)::
(gdb) b 'foo::(anonymous namespace)::

Without being able to lookup anonymous namespaces, gdb has no idea
where to continue from.

This works today without pubnames because gdb goes and constructs a
big list that includes anonymous namespaces by hand. Without anonymous
namespaces in the index, gdb would either lose that functionality, or
would have to parse the dwarf to find them. If it does that, then the
index isn't very helpful.

Reply via email to