From patchwork Fri Apr 17 09:37:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 6277 Received: (qmail 83073 invoked by alias); 17 Apr 2015 09:38:11 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 83060 invoked by uid 89); 17 Apr 2015 09:38:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f46.google.com Received: from mail-pa0-f46.google.com (HELO mail-pa0-f46.google.com) (209.85.220.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 17 Apr 2015 09:38:09 +0000 Received: by pabtp1 with SMTP id tp1so119953082pab.2 for ; Fri, 17 Apr 2015 02:38:07 -0700 (PDT) X-Received: by 10.66.55.42 with SMTP id o10mr3924937pap.148.1429263487718; Fri, 17 Apr 2015 02:38:07 -0700 (PDT) Received: from E107787-LIN.cambridge.arm.com (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id qo4sm9597233pab.33.2015.04.17.02.38.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Apr 2015 02:38:07 -0700 (PDT) From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH] Update comments to target_can_use_hardware_watchpoint Date: Fri, 17 Apr 2015 10:37:58 +0100 Message-Id: <1429263478-4011-1-git-send-email-qiyaoltc@gmail.com> X-IsSubscribed: yes From: Yao Qi The return value of target_can_use_hardware_watchpoint isn't well documented, so this patch is to update the comments to reflect the fact. This patch also removes a trailing ";" which is picked up from Pedro's patch https://sourceware.org/ml/gdb-patches/2015-04/msg00527.html gdb: 2015-04-17 Yao Qi Pedro Alves * target.h (target_can_use_hardware_watchpoint): Update comments. Remove trailing ";". --- gdb/target.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/gdb/target.h b/gdb/target.h index 8748ddf..f51f3e5 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -1807,14 +1807,17 @@ extern char *target_thread_name (struct thread_info *); /* If the *_hw_beakpoint functions have not been defined elsewhere use the definitions in the target vector. */ -/* Returns non-zero if we can set a hardware watchpoint of type TYPE. TYPE is - one of bp_hardware_watchpoint, bp_read_watchpoint, bp_write_watchpoint, or - bp_hardware_breakpoint. CNT is the number of such watchpoints used so far - (including this one?). OTHERTYPE is who knows what... */ +/* Returns positive if we can set a hardware watchpoint of type TYPE. + Returns negative if the target doesn't have enough hardware debug + registers available. Return zero if hardware watchpoint of type + TYPE isn't supported. TYPE is one of bp_hardware_watchpoint, + bp_read_watchpoint, bp_write_watchpoint, or bp_hardware_breakpoint. + CNT is the number of such watchpoints used so far, including this + one. OTHERTYPE is who knows what... */ #define target_can_use_hardware_watchpoint(TYPE,CNT,OTHERTYPE) \ (*current_target.to_can_use_hw_breakpoint) (¤t_target, \ - TYPE, CNT, OTHERTYPE); + TYPE, CNT, OTHERTYPE) /* Returns the number of debug registers needed to watch the given memory region, or zero if the requested memory region is not