Hi Sami,
sending a followup with patch I got.
Regards,
Jan
------------------------------------------------------------------------
Subject:
Support bogus global namespace emitted by g++ 4.1
From:
Michael Matz <matz@suse.de>
Date:
Wed, 13 May 2009 16:44:53 +0200 (CEST)
To:
Jan Kratochvil <jan.kratochvil@redhat.com>
To:
Jan Kratochvil <jan.kratochvil@redhat.com>
CC:
Richard Guenther <rguenther@suse.de>
Hi,
(it's my understanding that Richard already mentioned this, but anyway)
due to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28460 some old G++ emit
an explicit namespace declaration for the global namespace for some decls.
This is bogus and indeed confuses gdb (not the current CVS it seems, but
the archer branch at least). Unfortunately we now have to deal with this
in gdb as the bogus debug info is already out there.
So, here's a patch for that. I saw two options:
(1) hacking determine_prefix to return "" when it was just about to
return "::" for namespaces.
(2) not even linking that bogus namespace DIE into its children
It seems to me that option (2) is slightly more clear, so that's what I've
chosen. It works with the simple testcases I have using global decls.
Let me know what you think.
Ciao,
Michael.