From: Doug Evans <dje@google.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb <gdb@sourceware.org>
Subject: Re: Isn't it OK to drop 'set write'?
Date: Tue, 28 Jul 2015 17:51:00 -0000 [thread overview]
Message-ID: <CADPb22QYcH6QDOSk28oHP9MXpQ=FodZYvQELNsh+4iuF=J+ong@mail.gmail.com> (raw)
In-Reply-To: <20150726204905.GA18543@host1.jankratochvil.net>
On Sun, Jul 26, 2015 at 1:49 PM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> Hi,
>
> GDB 'set write on' currently does not work, it has regressed in 7.9:
> "set write on" or "--write" corrupt the binary file
> https://sourceware.org/bugzilla/show_bug.cgi?id=18168
> due to
> a485e98ea0cbb61ea9da1e7858da545e0bcf1a46 is the first bad commit
> Author: Alan Modra <amodra@gmail.com>
> Move ELF section headers to end of object file
Huh.
I'm curious how that broke things.
> $ echo 'int foo=10;int main(){}'|gcc -g -x c -
> $ cp -p a.out a.out-orig
> $ gdb -q -ex 'set trace-commands on' -ex 'set write on' -ex 'file a.out' -ex 'set foo=20' -ex q
> +set write on
> +file a.out
> Reading symbols from a.out...done.
> +set foo=20
> +q
> Segmentation fault
> $ cmp a.out a.out-orig && echo unchanged
> unchanged
>
> It is already unsupported for:
> writing into executable files is not supported for target: sysroots
>
> I cannot much imagine when it is useful. For updates of too big binaries
> there is gold incremental linking. Personally I have also never considered it
> safe enough to use it myself, hexedit is there if one needs to create a weird
> testfile.
>
>
> Either there is some use case for that and so the fix should be 7.10 blocker.
> Or the feature is no longer useful and it could be dropped which would
> significantly simplify me a build-id patchset being prepared.
Hi.
OOC, how does it simplify the build-id patchset?
next prev parent reply other threads:[~2015-07-28 17:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-26 20:49 Jan Kratochvil
2015-07-28 17:51 ` Doug Evans [this message]
2015-07-28 18:17 ` Jan Kratochvil
2015-08-03 18:11 ` Joel Brobecker
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='CADPb22QYcH6QDOSk28oHP9MXpQ=FodZYvQELNsh+4iuF=J+ong@mail.gmail.com' \
--to=dje@google.com \
--cc=gdb@sourceware.org \
--cc=jan.kratochvil@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