From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26592 invoked by alias); 28 Jul 2015 17:51:46 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 26578 invoked by uid 89); 28 Jul 2015 17:51:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ig0-f169.google.com Received: from mail-ig0-f169.google.com (HELO mail-ig0-f169.google.com) (209.85.213.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 28 Jul 2015 17:51:44 +0000 Received: by igbpg9 with SMTP id pg9so147614774igb.0 for ; Tue, 28 Jul 2015 10:51:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=WUwB+mHnczzE8evEhCQEIdp9WIWkxCWXBHpUCVDEa/Y=; b=mjGhQUc6iTOHR33TY3WISY7Ik0GOG12gN0zJFoX2xsGoatv5rA/XsZ44Ghpv+b3J+s 8RbW2If4Vj5S+8UtBH7+fnrBQnGxXbuOp8IyrW59HQ4Bd5g/ODay6C0SRVovsF+usMP/ JN5MWtmitVOxMwsCUiuBPIJO9thpOpRSp0yOtw1MC7J5jiGuZpn9NArWn5MtzcGrqTmW yAOlagXELX4RJV4lgQ25ZD4dh+Xp/GzzfQ1Z7vSaKgrbZl0gpDarOFT2ZNJvh/6e6lhE yGTrYEtfu72QFNG5eLBHTkodGwGcMCHPFKHoHzF9BG7U20LnLXEml/skLhSH+54f74F7 mb6g== X-Gm-Message-State: ALoCoQk3xzZmeMeQH+vX3N38ajiUvzE1dEXdoocYkqHr0fllY4Oa6jlDKptzaiC+pTVUn55Fmy1u X-Received: by 10.107.38.129 with SMTP id m123mr55037644iom.22.1438105902397; Tue, 28 Jul 2015 10:51:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.93.102 with HTTP; Tue, 28 Jul 2015 10:51:02 -0700 (PDT) In-Reply-To: <20150726204905.GA18543@host1.jankratochvil.net> References: <20150726204905.GA18543@host1.jankratochvil.net> From: Doug Evans Date: Tue, 28 Jul 2015 17:51:00 -0000 Message-ID: Subject: Re: Isn't it OK to drop 'set write'? To: Jan Kratochvil Cc: gdb Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg00069.txt.bz2 On Sun, Jul 26, 2015 at 1:49 PM, Jan Kratochvil 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 > 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?