From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9445 invoked by alias); 26 Jul 2012 21:50:02 -0000 Received: (qmail 9435 invoked by uid 22791); 26 Jul 2012 21:50:01 -0000 X-SWARE-Spam-Status: No, hits=-3.1 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mailrelay004.isp.belgacom.be (HELO mailrelay004.isp.belgacom.be) (195.238.6.170) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 26 Jul 2012 21:49:46 +0000 X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMBAKS6EVBR9qAt/2dsb2JhbAANOIVxsBGGXwEBAQMBI1YQCxgCAiYCAlcGhiSBdqdkbpMsgSCKL4VigRIDnnOJQ4Fd Received: from 45.160-246-81.adsl-dyn.isp.belgacom.be (HELO [192.168.1.2]) ([81.246.160.45]) by relay.skynet.be with ESMTP; 26 Jul 2012 23:49:44 +0200 Subject: Re: [patchv2] Write bpt at the ON_STACK bpt address From: Philippe Waroquiers To: Jan Kratochvil Cc: Joel Brobecker , Pedro Alves , gdb-patches@sourceware.org, "Maciej W. Rozycki" In-Reply-To: <20120726212339.GA1710@host2.jankratochvil.net> References: <20120723155951.GA24718@adacore.com> <20120723163513.GA1222@host2.jankratochvil.net> <1343074047.2209.23.camel@soleil> <20120723201611.GA19567@host2.jankratochvil.net> <1343075809.2209.53.camel@soleil> <501009AE.40901@redhat.com> <1343247870.2240.29.camel@soleil> <20120725212653.GC2767@adacore.com> <1343252775.2240.51.camel@soleil> <20120725223933.GD2767@adacore.com> <20120726212339.GA1710@host2.jankratochvil.net> Content-Type: text/plain; charset="UTF-8" Date: Thu, 26 Jul 2012 21:50:00 -0000 Message-ID: <1343339398.2258.119.camel@soleil> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2012-07/txt/msg00646.txt.bz2 On Thu, 2012-07-26 at 23:23 +0200, Jan Kratochvil wrote: > On Thu, 26 Jul 2012 00:39:33 +0200, Joel Brobecker wrote: > > > A valid instruction is not enough. We need a valid instruction > > > that will cause Valgrind to terminate block translation. > > > The breakpoint trap instruction is ok for that. > > > (0xcc for x86 and amd64, 0x0005000d for mips32). > > > > I think it is fine to update GDB to insert the breakpoint instruction > > instead of leaving random bytes at the breakpoint location. > > Attached. I no longer find it useful as arch-dependent code, it would do the > same in each arch. > > No regressions on {x86_64,x86_64-m32,i686}-fedorarawhide-linux-gnu. > > Philippe, do you have an easy enough way to regression test it on mips when > you was asking for the mips fix? mips has many execution modes as I see. Thanks for the patch. For mips, I have an access to gcc compile farm (gcc49). So, I can check it works on at least the execution mode of this machine. > > I still have to write a testcase for it using valgrind. IIUC, this implies to write a new 'gdbserver board file' (or something like that) which will allow to access the Valgrind gdbsrv. Note that this is covered by the Valgrind regression tests (that is how the change of behaviour with 7.4.91 was detected). Philippe