From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42881 invoked by alias); 19 Oct 2015 15:28:07 -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 42861 invoked by uid 89); 19 Oct 2015 15:28:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_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, 19 Oct 2015 15:28:01 +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 (Postfix) with ESMTPS id 98A369249B; Mon, 19 Oct 2015 15:28:00 +0000 (UTC) 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 t9JFRxK5030181; Mon, 19 Oct 2015 11:27:59 -0400 Message-ID: <56250BFE.7060300@redhat.com> Date: Mon, 19 Oct 2015 15:28:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Yao Qi CC: gdb-patches@sourceware.org Subject: Re: [PATCH 00/18] Remote all-stop on top of non-stop References: <1444836486-25679-1-git-send-email-palves@redhat.com> <86lhb23gm4.fsf@gmail.com> <86h9ln2i6x.fsf@gmail.com> In-Reply-To: <86h9ln2i6x.fsf@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-10/txt/msg00339.txt.bz2 Hi Yao, Thanks for the investigation. On 10/19/2015 12:47 PM, Yao Qi wrote: > There are some ways fixing this problem, > > 1. stop checking vCont;s packet anymore in range-stepping tests. > 2. let gdbarch_displaced_step_hw_singlestep returns true for arm-linux > in the multi-arch case like this, > > int > arm_displaced_step_hw_singlestep (struct gdbarch *gdbarch, > struct displaced_step_closure *closure) > { > if (target_can_do_single_step () == 1) > return 1; > > return 0; > } > then further, we need to either, > > 2.1 teach GDB core to support single stepping multiple instructions in > scratch pad. Nowadays, GDB only expects one stop event when executing > instructions in the scratchpad. ARM is the only target that GDB > copies more than one instructions to the scratchpad, and resume > program there instead of single step. Other targets, like x86, > aarch64, GDB only copies *one* instruction to the scratchpad and > single step. > 2.2 rewrite arm displaced stepping code to be aware that the target > may be able to do single step, so that each time GDB has only to copy > one instruction to the scratchpad, do single step and fix up if necessary. > > Fix #1 looks reasonable and ideal to me, and the easiest one. Fix #2.1 > and #2.2 will need much work, at least #2.2, and I don't know how useful > #2.1 is. > Agreed, looks like #1 is the way to go. #2.1 may even be counter productive -- running to a breakpoint to skip multiple instructions at once is likely faster than multiple hardware single-steps. Thanks, Pedro Alves