From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20509 invoked by alias); 7 Nov 2013 19:57:26 -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 20496 invoked by uid 89); 7 Nov 2013 19:57:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.1 required=5.0 tests=AWL,BAYES_50,FAKE_REPLY_C,RDNS_NONE,SPAM_SUBJECT,SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 07 Nov 2013 19:57:25 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rA7JvGCR007751 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 7 Nov 2013 14:57:16 -0500 Received: from host2.jankratochvil.net (ovpn-113-183.phx2.redhat.com [10.3.113.183]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rA7JvCYc030900 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Thu, 7 Nov 2013 14:57:15 -0500 Date: Thu, 07 Nov 2013 20:10:00 -0000 From: Jan Kratochvil To: Samuel Bronson Cc: gdb-patches@sourceware.org, Tom Tromey Subject: Re: [PATCH] Resurrect gdb-add-index as a contrib script Message-ID: <20131107195712.GA25547@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1383519137-26388-1-git-send-email-naesten@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2013-11/txt/msg00206.txt.bz2 On Sun, 03 Nov 2013 23:52:17 +0100, Samuel Bronson wrote: > --- a/gdb/ChangeLog > +++ b/gdb/ChangeLog > @@ -1,3 +1,8 @@ > +2013-11-03 Samuel Bronson Here should be listed also primarily Tom, not sure if you imported some Doug's changes and also myself. > --- /dev/null > +++ b/gdb/contrib/gdb-add-index.sh > @@ -0,0 +1,33 @@ > +#! /bin/sh > + > +# Add a .gdb_index section to a file. > + > +# Copyright (C) 2010 Free Software Foundation, Inc. 2010-2013 > +# This program is free software; you can redistribute it and/or modify > +# it under the terms of the GNU General Public License as published by > +# the Free Software Foundation; either version 3 of the License, or > +# (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +# GNU General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License > +# along with this program. If not, see . > + > +file="$1" > +dir="${file%/*}" You could fix the execution with no / in $1. > + > +# We don't care if gdb gives an error. > +gdb -nx -iex 'set auto-load no' --batch-silent \ > + -ex "file $file" \ > + -ex "save gdb-index $dir" > + > +if test -f "${file}.gdb-index"; then > + objcopy --add-section .gdb_index="${file}.gdb-index" \ > + --set-section-flags .gdb_index=readonly "$file" "$file" > + rm -f "${file}.gdb-index" > +fi > + > +exit 0 > -- > 1.8.4.rc3 On Mon, 04 Nov 2013 03:04:48 +0100, Samuel Bronson wrote: > It also occurs to me that people might want to use fragments of this > in their build systems, so it might be better to use the simple > permissive license from > ; > would that be okay? I do not see a reason to make such exception although it is Tom's script so it is more up to him. I find such a possible request can be considered if it ever appears. On Mon, 04 Nov 2013 20:33:20 +0100, Samuel Bronson wrote: > Oops. My last email was supposed to say something about "gdb-add-index > foo" not working when foo had no / in it. This is the problem which > the "this" in the next part was meant to refer to. I did not find too clear from the archives why Tom has removed the script. I found only Re: [patch] gdb-add-index tweaks https://sourceware.org/ml/gdb-patches/2010-09/msg00133.html so IIUC the script still was far from perfect so it was not acceptable for FSF GDB distribution. So the newly existing gdb/contrib/ directory seems as an appropriate place for the script to me. Thanks, Jan