From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25961 invoked by alias); 17 Aug 2009 15:31:04 -0000 Received: (qmail 25950 invoked by uid 22791); 17 Aug 2009 15:31:03 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_44,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 17 Aug 2009 15:30:53 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7HFSour000942; Mon, 17 Aug 2009 11:28:50 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n7HFSnZN005901; Mon, 17 Aug 2009 11:28:49 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n7HFSmH2023912; Mon, 17 Aug 2009 11:28:49 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 320AE3782C7; Mon, 17 Aug 2009 09:28:48 -0600 (MDT) From: Tom Tromey To: Pedro Alves Cc: gdb-patches@sourceware.org, Jan Kratochvil Subject: Re: [patch] Replace reread_symbols by load+free calls References: <8ac60eac0906101839t4d3978fyc1c6d3b3e2eccb6e@mail.gmail.com> <20090625192120.GA29930@host0.dyn.jankratochvil.net> <200908150010.00090.pedro@codesourcery.com> Reply-To: Tom Tromey Date: Mon, 17 Aug 2009 15:41:00 -0000 In-Reply-To: <200908150010.00090.pedro@codesourcery.com> (Pedro Alves's message of "Sat, 15 Aug 2009 00:09:59 +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 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-08/txt/msg00240.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Pedro> There were also some FIXME comments related to bfd_get_mtime Pedro> in the patch that looked like misunderstandings, and that threw Pedro> me off. Maybe I just didn't understand them. :-/ I was wondering about those too. Pedro> There's also this comment in the current code that makes that Pedro> suggested change scare me: Pedro> /* There are various functions like symbol_file_add, Pedro> symfile_bfd_open, syms_from_objfile, etc., which might Pedro> appear to do what we want. But they have various other Pedro> effects which we *don't* want. So we just do stuff Pedro> ourselves. (...) */ Pedro> ... as we'd be going in the opposite direction (the patch uses Pedro> symbol_file_add). That comment looks stale. It mentions mapped files, as well, which IIUC gdb hasn't had for years. Pedro> I wonder how much would we simplify reread_symbols by moving the Pedro> each-objfile rereading code to objfile.c, and refactor it to share code Pedro> with allocate_objfile, free_objfile, etc., and thus also making it easier Pedro> to make hooks and observers be consistent. Yeah, that would work for me. Tom