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: 47275 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0FBD720553 for ; Fri, 17 Apr 2015 09:38:24 +0000 (UTC) Received: by lbbrr5 with SMTP id rr5sf22525709lbb.3 for ; Fri, 17 Apr 2015 02:38:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-subscribe:list-archive :list-post:list-help:sender:delivered-to:from:to:subject:date :message-id:x-original-sender:x-original-authentication-results; bh=4yBrgRIBls+GMP65aJJjUwtHE/sHzKWq4jWur2qUbQw=; b=b9riwH2Jv2dspR3xpy85904H+3re8z73LVXXonH89nD5LYKarHIRa4PSmz9lWDpSzA Eh6R7Q2X2In52HppTCHyALjbl6wQ87KJDBvghWDAIbdzJ8OSOB9hfBdxIns9AwFziSUT CNUw4uepkk2LrziMwXzCG/zYjbME3naJpKWoKRUx/RiAj4yQRjQbzN98Ipq6qIlQ3R6O 7AWACVWJqXebXADfuW8lUTIzu8Z2pKHHp3zDLJtfNM1OkGg0iGpLX0uc80fDOjst7wsQ d0Nbsij/TdndREvbQWL7nxRcXVJLSUqRiuMklTdYhOfdhMRoTQUMKeEhYHJnrgSOepZl 8HCg== X-Gm-Message-State: ALoCoQl5H4U69E2AdFQ5zCqtZLljo7d133uDhmb1cyYRPqijgLBVikKjGflgrmp2etP9vKgOQXwC X-Received: by 10.112.122.39 with SMTP id lp7mr962314lbb.5.1429263503088; Fri, 17 Apr 2015 02:38:23 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.205.37 with SMTP id ld5ls466055lac.52.gmail; Fri, 17 Apr 2015 02:38:22 -0700 (PDT) X-Received: by 10.112.181.68 with SMTP id du4mr1778142lbc.11.1429263502680; Fri, 17 Apr 2015 02:38:22 -0700 (PDT) Received: from mail-la0-x233.google.com (mail-la0-x233.google.com. [2a00:1450:4010:c03::233]) by mx.google.com with ESMTPS id k2si8364144lah.93.2015.04.17.02.38.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Apr 2015 02:38:22 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::233 as permitted sender) client-ip=2a00:1450:4010:c03::233; Received: by laat2 with SMTP id t2so75857736laa.1 for ; Fri, 17 Apr 2015 02:38:22 -0700 (PDT) X-Received: by 10.112.204.6 with SMTP id ku6mr1800203lbc.73.1429263501660; Fri, 17 Apr 2015 02:38:21 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.67.65 with SMTP id l1csp3621852lbt; Fri, 17 Apr 2015 02:38:20 -0700 (PDT) X-Received: by 10.68.69.9 with SMTP id a9mr3907321pbu.68.1429263499915; Fri, 17 Apr 2015 02:38:19 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id vl10si15916716pbc.182.2015.04.17.02.38.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Apr 2015 02:38:19 -0700 (PDT) Received-SPF: pass (google.com: domain of gdb-patches-return-122059-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 83073 invoked by alias); 17 Apr 2015 09:38:11 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 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 X-Original-Sender: qiyaoltc@gmail.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::233 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@sourceware.org; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com X-Google-Group-Id: 836684582541 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