From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24159 invoked by alias); 24 Apr 2013 17:30:45 -0000 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 Received: (qmail 24150 invoked by uid 89); 24 Apr 2013 17:30:44 -0000 X-Spam-SWARE-Status: No, score=-6.5 required=5.0 tests=AWL,BAYES_40,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.1 Received: from mga14.intel.com (HELO mga14.intel.com) (143.182.124.37) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 24 Apr 2013 17:30:44 +0000 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 24 Apr 2013 10:30:41 -0700 X-ExtLoop1: 1 Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by azsmga001.ch.intel.com with ESMTP; 24 Apr 2013 10:30:25 -0700 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.244]) by IRSMSX104.ger.corp.intel.com ([169.254.5.19]) with mapi id 14.01.0355.002; Wed, 24 Apr 2013 18:30:21 +0100 From: "Blanc, Nicolas" To: Pedro Alves , Tom Tromey CC: "gdb-patches@sourceware.org" Subject: RE: [PATCH 0/3] remove-symbol-file Date: Wed, 24 Apr 2013 20:40:00 -0000 Message-ID: <388084C8C1E6A64FA36AD1D656E4856619DEEE98@IRSMSX102.ger.corp.intel.com> References: <1366098721-18302-1-git-send-email-nicolas.blanc@intel.com> <8761zdow5j.fsf@fleche.redhat.com> In-Reply-To: <8761zdow5j.fsf@fleche.redhat.com> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2013-04/txt/msg00749.txt.bz2 Thanks Tom, Pedro for your feedback.=20 I'll try to respond to both of you in this email. This implementation only removes files that were added via the add-symbol-f= ile command. The add-symbol-file command takes as parameter the address of the text sess= ion. In this context I think the text address is the most appropriate way to remove a fi= le because: 1) the user knows exactly where the .text section was loaded, 2) an application can load shared libraries several times at different ad= dresses (it's a requirement for me), and 3) I can't think of a good reason why someone would add a second symbol f= ile at the same address. Most likely this is a user error that should have been reported by add= -symbol-file. Note that currently in Option 4 below ADDR is in fact "objf->addr_low", but= the command could be more generous by searching first which file corresponds to ADDR and then removing it. Thi= s would be more flexible and an alternative to Option 3, for instance. 1) remove-symbol-file FILE 2) remove-symbol-file FILE ADDR 3) remove-symbol-file -s .data DATA_ADDR 4) remove-symbol-file ADDR As a matter of taste I prefer the options where FILE is not mandatory becau= se this can easily be more ambiguous. Now as suggested by Tom, the scope of the command could also be broaden to = allow removing any symbol file. I could try to lift this restriction if you think there is mor= e general need for removing arbitrary symbol files. What are your preferences? Best Regards, Nicolas Intel GmbH Dornacher Strasse 1 85622 Feldkirchen/Muenchen, Deutschland Sitz der Gesellschaft: Feldkirchen bei Muenchen Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk Registergericht: Muenchen HRB 47456 Ust.-IdNr./VAT Registration No.: DE129385895 Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052