From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 454 invoked by alias); 2 Dec 2009 17:29:08 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 445 invoked by uid 22791); 2 Dec 2009 17:29:07 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org From: Tom Tromey To: Dodji Seketeli Cc: Cary Coutant , GDB/Archer list Subject: Re: [RFC] Proposal for a new DWARF name index section References: <4A7FE28D.4050901@redhat.com> <4A8D8868.3010302@redhat.com> <20091202161049.GD4450@tintin.torimasen.com> Reply-To: Tom Tromey Date: Wed, 02 Dec 2009 17:29:00 -0000 In-Reply-To: <20091202161049.GD4450@tintin.torimasen.com> (Dodji Seketeli's message of "Wed, 2 Dec 2009 17:10:49 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2009-q4/txt/msg00072.txt.bz2 >>>>> "Dodji" == Dodji Seketeli writes: Tom> The other problem I've noticed is name canonicalization. This past Tom> year, we changed gdb to canonicalize names in its symbol tables, and to Tom> canonicalize user input before doing lookups. This lets gdb return the Tom> right answer even when the order of modifiers varies. This change Tom> slowed down DWARF reading, and it occurred to me that it would also Tom> substantially slow down index reading. So, I would also like to change Tom> the .debug_gnu_index spec to specify how names are to be canonicalized. Dodji> Just to be sure I understand. How saying _how_ the strings are to be Dodji> canonicalized is going to speed up significantly GDB's processing? Dodji> I would have have thought that the killer gain would come from the Dodji> producing directly what the consumer expects. I guess I am missing Dodji> something. The producer and consumer need to agree on the format. The best way to do that is define what the format actually is. GDB must canonicalize names in order to do lookups in a sane way. E.g., see: http://sourceware.org/bugzilla/show_bug.cgi?id=8617. So, GDB applies the same canonicalization to the names coming from DWARF, and to the names the user enters. Then it can do simple string comparisons to find names. But, GDB does not actually care about most details of this canonicalization. As a practical matter I would assume that we would define the canonical form to conveniently align with our already-existing code. Maybe this is all really wrong-headed, though, and it would be better to change gdb to have a structured symbol table. I haven't really considered this approach much. Tom