From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10875 invoked by alias); 8 Sep 2014 22:50:27 -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 10796 invoked by uid 89); 8 Sep 2014 22:50:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 08 Sep 2014 22:50:24 +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 s88MoKgr006726 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 8 Sep 2014 18:50:21 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s88MoJlr006284; Mon, 8 Sep 2014 18:50:19 -0400 Message-ID: <540E32AA.70705@redhat.com> Date: Mon, 08 Sep 2014 22:50:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: Joel Brobecker CC: GDB Patches Subject: Re: eliminate deprecated_insert_raw_breakpoint. what's left. References: <540DEB7E.3000100@redhat.com> <20140908192432.GE28404@adacore.com> <20140908213427.GF28404@adacore.com> In-Reply-To: <20140908213427.GF28404@adacore.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-09/txt/msg00207.txt.bz2 On 09/08/2014 10:34 PM, Joel Brobecker wrote: > I was looking at how to replace that call, but I am not sure > how to fix the code up, though. Perhaps we could just write > the breakpoint instruction in by hand, rather than go through > the breakpoint module? After all, it is already doing almost > everything else by hand! Indeed. > In fact, looking at the code again now, I'm a little more tempted > to see what happens if we remove it ;-). Me too. And seriously. :-) I traced it back to I think the original rs6000 port, in 1991... commit 41abdfbd2de07837ba8088092765154eaa66351d Author: John Gilmore Date: Tue Nov 12 15:50:47 1991 +0000 * rs6000-pinsn.c, rs6000-tdep.c, rs6000-xdep.c, tm-rs6000.h, xm-rs6000.h: New files. * xcoffexec.c: New file for handling AIX shared libraries. We already see this then, in rs6000-xdep.c: + /* execute one dummy instruction (which is a breakpoint) in inferior + process. So give kernel a chance to do internal house keeping. + Otherwise the following ptrace(2) calls will mess up user stack + since kernel will get confused about the bottom of the stack (%sp) */ + + exec_one_dummy_insn (); This sounds like working around a (very) old kernel bug... I can't believe anything resembling a modern system would need such a monstrosity! :-) I vote just removing all that. Thanks, Pedro Alves