From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5819 invoked by alias); 15 Oct 2015 15:58:16 -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 5802 invoked by uid 89); 15 Oct 2015 15:58:15 -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: usevmg21.ericsson.net Received: from usevmg21.ericsson.net (HELO usevmg21.ericsson.net) (198.24.6.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 15 Oct 2015 15:58:14 +0000 Received: from EUSAAHC002.ericsson.se (Unknown_Domain [147.117.188.78]) by usevmg21.ericsson.net (Symantec Mail Security) with SMTP id 05.69.26730.AA06F165; Thu, 15 Oct 2015 10:15:38 +0200 (CEST) Received: from [142.133.110.95] (147.117.188.8) by smtp-am.internal.ericsson.com (147.117.188.80) with Microsoft SMTP Server id 14.3.248.2; Thu, 15 Oct 2015 11:58:11 -0400 Subject: Re: [PATCH v2 1/7] Add breakpoint_from_pc target_ops for software breakpoints in GDBServer. To: Pedro Alves , References: <1444063455-31558-1-git-send-email-antoine.tremblay@ericsson.com> <1444063455-31558-2-git-send-email-antoine.tremblay@ericsson.com> <561FC758.4020301@redhat.com> From: Antoine Tremblay Message-ID: <561FCD13.4090305@ericsson.com> Date: Thu, 15 Oct 2015 15:58: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: <561FC758.4020301@redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00251.txt.bz2 On 10/15/2015 11:33 AM, Pedro Alves wrote: > On 10/05/2015 05:44 PM, Antoine Tremblay wrote: >> +static const unsigned char * > > gdb_byte? > >> +aarch64_breakpoint_from_pc (CORE_ADDR *pcptr, int *len) >> +{ >> + *len = aarch64_breakpoint_len; >> + return (const unsigned char *) &aarch64_breakpoint; > > ... and then this cast goes away. > >> +} >> + > Ouch indeed that was very wrong , I also fixed bfin, m68k, s390 and sparc that had the same kind of issue. >> +static const unsigned char * >> +arm_breakpoint_from_pc (CORE_ADDR *pcptr, int *len) >> +{ > > Missing '/* Implementation of ... */' comment. > Done. >> +} >> struct linux_target_ops the_low_target = { > > Missing empty line. > Done. > >> + >> + /* Return the raw breakpoint for this target based on PC. The PCPTR is >> + ajusted to the real memory location in case a flag was present in the > > "adjusted". Suggest an example, like "a flag (e.g., the Thumb bit on ARM) was" > Done. >> + PC. */ >> + const unsigned char *(*breakpoint_from_pc) (CORE_ADDR *pcptr, int *lenptr); > > Thanks, > Pedro Alves >