From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27433 invoked by alias); 4 Nov 2003 16:31:15 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 27388 invoked from network); 4 Nov 2003 16:31:14 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 4 Nov 2003 16:31:14 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 39E0B2B8F; Tue, 4 Nov 2003 11:31:09 -0500 (EST) Message-ID: <3FA7D44D.6090605@gnu.org> Date: Tue, 04 Nov 2003 16:31:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Joel Brobecker Cc: David Carlton , Andrew Cagney , binutils@sources.redhat.com, gdb@sources.redhat.com Subject: Re: A gdb+bfd string pool? References: <3FA27C9B.1000702@redhat.com> <20031104081622.GB883@gnat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-11/txt/msg00024.txt.bz2 > Personally, I'd be against this unless we have reason to believe that >> it's an important optimization. I don't like global data in general, >> even if it's only global to one component of a program, and having >> that data shared by both GDB and BFD makes me even more nervous. >> (Singleton is not my favorite design pattern.) So it sets of warning >> bells for general design reasons; our lack of const-correctness when >> dealing with names makes me even more nervous. > > > I have the exact same feeling. > > May I recommend that, should we decide to use one, we isolate it from > GDB's code via a layer. So each module would use it's layer as if it was > not shared. It will make the move back easier, in case it's ever needed. Ok, ok, I've been sufficiently beaten to a pulp :-) I've also come across a reason that a single pool may not be such a good idea. GDB had (it broke >4 years ago and is now beyond repair) a technique for caching per-object data on a memory-mapped disk. Having the objfile symbol table point into a shared pool would make any future plans to re-implement that technique unworkable. enjoy, Andrew