From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 83803 invoked by alias); 16 Oct 2015 19:48:12 -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 83776 invoked by uid 89); 16 Oct 2015 19:48:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: usevmg20.ericsson.net Received: from usevmg20.ericsson.net (HELO usevmg20.ericsson.net) (198.24.6.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 16 Oct 2015 19:48:10 +0000 Received: from EUSAAHC006.ericsson.se (Unknown_Domain [147.117.188.90]) by usevmg20.ericsson.net (Symantec Mail Security) with SMTP id 73.2F.32596.E14F0265; Fri, 16 Oct 2015 14:57:02 +0200 (CEST) Received: from [142.133.110.95] (147.117.188.8) by smtp-am.internal.ericsson.com (147.117.188.92) with Microsoft SMTP Server id 14.3.248.2; Fri, 16 Oct 2015 15:48:06 -0400 Subject: Re: [PATCH v2 4/7] Support breakpoint kinds for software breakpoints in GDBServer. To: Pedro Alves , , Yao Qi References: <1444063455-31558-1-git-send-email-antoine.tremblay@ericsson.com> <1444063455-31558-5-git-send-email-antoine.tremblay@ericsson.com> <561FCB85.4020500@redhat.com> <561FEA3A.5020801@ericsson.com> <56212081.5090703@redhat.com> <56213D20.8090803@ericsson.com> <56214A33.5060109@redhat.com> <56214EC0.9070806@ericsson.com> <56215380.7070908@ericsson.com> From: Antoine Tremblay Message-ID: <56215476.7000709@ericsson.com> Date: Fri, 16 Oct 2015 19:48:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <56215380.7070908@ericsson.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00300.txt.bz2 On 10/16/2015 03:44 PM, Antoine Tremblay wrote: > > > On 10/16/2015 03:23 PM, Antoine Tremblay wrote: >> >> >> On 10/16/2015 03:04 PM, Pedro Alves wrote: >>> >>> Note that there's always a need to implement _one_ hook on all >>> architecture. In your version, it's the breakpoint_from_pc hook. >>> In my suggestion, it's breakpoint_from_kind. But it's the same >>> number of "hooks x architectures implementations". >> >> Good point it would only transfer the operation to archs that can >> software single step basically, I withdraw this concern. > > Humm thinking more about it however if we were to apply the same logic > to pc and pcfull. > > Removing the pc from the struct would cause a call to > breakpoint_kind_from_pc to be mandatory. > > Would you see too pc to be removed ? > > And replaced by a call to : > > static CORE_ADDR > bp_pc (CORE_ADDR *pcptr) > { > return breakpoint_kind_from_pc (pcptr, 0) > } > Oops I mean static CORE_ADDR bp_pc (struct raw_breakpoint *bp) { CORE_ADDR pc = bp->pcfull; breakpoint_kind_from_pc (&pc, 0) return pc; }