From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Samuel Bronson <naesten@gmail.com>
Cc: gdb-patches@sourceware.org, Tom Tromey <tromey@redhat.com>
Subject: Re: [PATCH] Resurrect gdb-add-index as a contrib script
Date: Thu, 07 Nov 2013 20:10:00 -0000 [thread overview]
Message-ID: <20131107195712.GA25547@host2.jankratochvil.net> (raw)
In-Reply-To: <CAJYzjmeW9q-EkqyaLrTckRSuD4uqZ0m29eZJGqpZRGY4UwSnXg@mail.gmail.com> <CAJYzjmfvp7KEU=fvh06XBUMNVSXQG+kS7uG-02UnHqWWXf6zdQ@mail.gmail.com> <1383519137-26388-1-git-send-email-naesten@gmail.com>
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 <naesten@gmail.com>
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 <http://www.gnu.org/licenses/>.
> +
> +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
> <http://www.gnu.org/prep/maintain/maintain.html#License-Notices-for-Other-Files>;
> 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
next prev parent reply other threads:[~2013-11-07 19:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-03 22:52 Samuel Bronson
2013-11-04 2:05 ` Samuel Bronson
2013-11-04 21:17 ` Samuel Bronson
2013-11-07 20:10 ` Jan Kratochvil [this message]
2013-11-07 21:54 ` Tom Tromey
2013-11-09 6:23 ` [PATCH v2] " Samuel Bronson
2013-11-09 18:41 ` [PATCH v3] " Samuel Bronson
2013-11-11 19:46 ` Doug Evans
2013-11-15 3:31 ` [PATCH v4] " Samuel Bronson
2013-11-15 10:50 ` Doug Evans
2013-11-15 15:27 ` Jan Kratochvil
2013-11-15 16:38 ` Eli Zaretskii
2013-11-15 22:00 ` [PATCH v5] " Samuel Bronson
2013-11-16 12:12 ` Jan Kratochvil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131107195712.GA25547@host2.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=naesten@gmail.com \
--cc=tromey@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox