From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81057 invoked by alias); 15 Oct 2015 10:50:32 -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 81037 invoked by uid 89); 15 Oct 2015 10:50:32 -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; Thu, 15 Oct 2015 10:50:31 +0000 Received: from EUSAAHC002.ericsson.se (Unknown_Domain [147.117.188.78]) by usevmg20.ericsson.net (Symantec Mail Security) with SMTP id D0.AC.32596.CA42F165; Thu, 15 Oct 2015 05:59:40 +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 06:50:28 -0400 Subject: Re: [PATCH v2 2/7] Add breakpoint_from_kind target_ops for software breakpoints in GDBServer. To: Yao Qi References: <1444063455-31558-1-git-send-email-antoine.tremblay@ericsson.com> <1444063455-31558-3-git-send-email-antoine.tremblay@ericsson.com> <867fmo4i64.fsf@gmail.com> CC: From: Antoine Tremblay Message-ID: <561F84F3.8080702@ericsson.com> Date: Thu, 15 Oct 2015 10:50: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: <867fmo4i64.fsf@gmail.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00242.txt.bz2 On 10/15/2015 05:04 AM, Yao Qi wrote: > Antoine Tremblay writes: > >> diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h >> index 603819e..74fb36d 100644 >> --- a/gdb/gdbserver/target.h >> +++ b/gdb/gdbserver/target.h >> @@ -446,6 +446,10 @@ struct target_ops >> can be NULL, the default breakpoint for the target should be returned in >> this case. */ >> const unsigned char *(*breakpoint_from_pc) (CORE_ADDR *pcptr, int *lenptr); >> + >> + /* Returns a breakpoint from a kind, a kind is a length can have target >> + specific meaning like the z0 kind parameter. */ >> + const unsigned char *(*breakpoint_from_kind) (int *kind); >> }; > > Since this function is used for software breakpoint, how about renaming > it to software_breakpoint_from_kind? Sorry that I didn't raise this up > in the review lats time. > Humm I would be for it for it if it did not translate in long names like linux_software_breakpoint_from_kind (36 chars almost half a line) and I can't see any confusion with hardware breakpoints since we return a byte array. I would also need to change breakpoint_from_pc from the previous patch to software_breakpoint_from_pc ? Also, the old names were too "breakpoint and breakpoint_len rather then sofwware_breakpoint software_breakpoint_len"... Overall I feel while it adds some meaning it removes no confusion in the context it is used. Would it be ok to leave it as is ? > Otherwise it is OK. >