public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/17821] New: Handling (anonymous namespace) in .gdb_index
@ 2015-01-08 23:13 dje at google dot com
2015-02-13 19:15 ` [Bug symtab/17821] " dje at google dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: dje at google dot com @ 2015-01-08 23:13 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17821
Bug ID: 17821
Summary: Handling (anonymous namespace) in .gdb_index
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: symtab
Assignee: unassigned at sourceware dot org
Reporter: dje at google dot com
I'm still digging through the details of this bug, but I wanted to get
something written down so I can add it to the 7.9 wiki.
[Whether a fix can make it into 7.9 remains to be seen.]
Gold adds "(anonymous namespace)" to .gdb_index,
but gdb doesn't use that name in expanded symbol tables.
new_symbol_full sees a missing name and thus skips the symbol.
This is causing symbol lookup issues.
[More to follow ...]
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug symtab/17821] Handling (anonymous namespace) in .gdb_index
2015-01-08 23:13 [Bug symtab/17821] New: Handling (anonymous namespace) in .gdb_index dje at google dot com
@ 2015-02-13 19:15 ` dje at google dot com
2015-02-14 10:09 ` dje at google dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: dje at google dot com @ 2015-02-13 19:15 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17821
--- Comment #1 from dje at google dot com ---
Part of the original problem was addressed with the patches for PR 17591.
The remaining issue is both a performance and a correctness issue:
anonymous namespaces don't, when new_symbol_full is called, have names.
Thus they are not entered into the symbol table.
The correctness issue is PR 17974.
The remainder of this bug is the perf issue.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug symtab/17821] Handling (anonymous namespace) in .gdb_index
2015-01-08 23:13 [Bug symtab/17821] New: Handling (anonymous namespace) in .gdb_index dje at google dot com
2015-02-13 19:15 ` [Bug symtab/17821] " dje at google dot com
@ 2015-02-14 10:09 ` dje at google dot com
2015-02-22 17:15 ` cvs-commit at gcc dot gnu.org
2015-05-21 17:39 ` dje at google dot com
3 siblings, 0 replies; 5+ messages in thread
From: dje at google dot com @ 2015-02-14 10:09 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17821
--- Comment #2 from dje at google dot com ---
Correction: The bug for the correctness issue is PR 17976,
not 17974.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug symtab/17821] Handling (anonymous namespace) in .gdb_index
2015-01-08 23:13 [Bug symtab/17821] New: Handling (anonymous namespace) in .gdb_index dje at google dot com
2015-02-13 19:15 ` [Bug symtab/17821] " dje at google dot com
2015-02-14 10:09 ` dje at google dot com
@ 2015-02-22 17:15 ` cvs-commit at gcc dot gnu.org
2015-05-21 17:39 ` dje at google dot com
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-02-22 17:15 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17821
--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Doug Evans <devans@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=96553a0cffb30d2ac6068eb71bed38ea7432073b
commit 96553a0cffb30d2ac6068eb71bed38ea7432073b
Author: Doug Evans <dje@google.com>
Date: Sat Feb 21 21:58:31 2015 -0800
PR c++/17976, symtab/17821
This patch addresses two issues.
The basic problem is that "(anonymous namespace)" doesn't get entered
into the symbol table because when dwarf2read.c:new_symbol_full is called
the DIE has no name (dwarf2_name returns NULL).
PR 17976: ptype '(anonymous namespace)' should work like any namespace
PR 17821: perf issue looking up (anonymous namespace)
bash$ gdb monster-program
(gdb) mt set per on
(gdb) mt set symbol-cache-size 0
(gdb) break (anonymous namespace)::foo
Before:
Command execution time: 3.266289 (cpu), 6.169030 (wall)
Space used: 811429888 (+12910592 for this command)
After:
Command execution time: 1.264076 (cpu), 4.057408 (wall)
Space used: 798781440 (+0 for this command)
gdb/ChangeLog:
PR c++/17976, symtab/17821
* cp-namespace.c (cp_search_static_and_baseclasses): New parameter
is_in_anonymous. All callers updated.
(find_symbol_in_baseclass): Ditto.
(cp_lookup_nested_symbol_1): Ditto. Don't search all static blocks
for symbols in an anonymous namespace.
* dwarf2read.c (namespace_name): Don't call dwarf2_name, fetch
DW_AT_name directly.
(dwarf2_name): Convert missing namespace name to
CP_ANONYMOUS_NAMESPACE_STR.
gdeb/testsuite/ChangeLog:
* gdb.cp/anon-ns.exp: Add test for ptype '(anonymous namespace)'.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug symtab/17821] Handling (anonymous namespace) in .gdb_index
2015-01-08 23:13 [Bug symtab/17821] New: Handling (anonymous namespace) in .gdb_index dje at google dot com
` (2 preceding siblings ...)
2015-02-22 17:15 ` cvs-commit at gcc dot gnu.org
@ 2015-05-21 17:39 ` dje at google dot com
3 siblings, 0 replies; 5+ messages in thread
From: dje at google dot com @ 2015-05-21 17:39 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17821
dje at google dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from dje at google dot com ---
patch committed
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-05-21 17:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-08 23:13 [Bug symtab/17821] New: Handling (anonymous namespace) in .gdb_index dje at google dot com
2015-02-13 19:15 ` [Bug symtab/17821] " dje at google dot com
2015-02-14 10:09 ` dje at google dot com
2015-02-22 17:15 ` cvs-commit at gcc dot gnu.org
2015-05-21 17:39 ` dje at google dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).