From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 126210 invoked by alias); 3 Aug 2015 09:40:29 -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 126189 invoked by uid 89); 3 Aug 2015 09:40:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 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-f54.google.com Received: from mail-pa0-f54.google.com (HELO mail-pa0-f54.google.com) (209.85.220.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 03 Aug 2015 09:40:27 +0000 Received: by pacgq8 with SMTP id gq8so21031874pac.3 for ; Mon, 03 Aug 2015 02:40:25 -0700 (PDT) X-Received: by 10.67.1.72 with SMTP id be8mr34243472pad.47.1438594825809; Mon, 03 Aug 2015 02:40:25 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id iw2sm7243813pbb.67.2015.08.03.02.40.23 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 03 Aug 2015 02:40:24 -0700 (PDT) From: Yao Qi To: Simon Marchi Cc: Subject: Re: [PATCH] Mostly trivial enum fixes References: <1438362504-6940-1-git-send-email-simon.marchi@ericsson.com> Date: Mon, 03 Aug 2015 09:40:00 -0000 In-Reply-To: <1438362504-6940-1-git-send-email-simon.marchi@ericsson.com> (Simon Marchi's message of "Fri, 31 Jul 2015 13:08:24 -0400") Message-ID: <86mvy8emmb.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00016.txt.bz2 Simon Marchi writes: > -/* Get the ARM hardware breakpoint type from the RW value we're given wh= en > - asked to set a watchpoint. */ > +/* Get the ARM hardware breakpoint type from the type value we're > + given when asked to set a watchpoint. */ > static arm_hwbp_type=20 > -arm_linux_get_hwbp_type (int rw) > +arm_linux_get_hwbp_type (enum target_hw_bp_type type) > { > if (rw =3D=3D hw_read) > return arm_hwbp_load; Argument "rw" is updated to "type", but its uses inside function are not updated. This breaks GDB native build on arm-linux. Patch below fixed it. Patch is pushed in. --=20 Yao (=E9=BD=90=E5=B0=A7) =46rom 8156fe7f47884390b7404af15903795bb607658b Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Mon, 3 Aug 2015 10:37:23 +0100 Subject: [PATCH] Enum fix for arm-linux-nat.c This patch fixes GDB build breakage on arm-linux. gdb: 2015-08-03 Yao Qi * arm-linux-nat.c (arm_linux_get_hwbp_type): Capitalize "type" in comment. Replace "rw" with "type". (arm_linux_remove_watchpoint): Change type of "rw" to "enum target_hw_bp_type". diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b8840fd..817610e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2015-08-03 Yao Qi + + * arm-linux-nat.c (arm_linux_get_hwbp_type): Capitalize "type" + in comment. Replace "rw" with "type". + (arm_linux_remove_watchpoint): Change type of "rw" to + "enum target_hw_bp_type". + 2015-08-02 Pierre-Marie de Rodat =20 * alpha-mdebug-tdep.c (find_proc_desc): Update call to diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c index e2e43ac..825da4c 100644 --- a/gdb/arm-linux-nat.c +++ b/gdb/arm-linux-nat.c @@ -923,14 +923,14 @@ arm_linux_hw_breakpoint_initialize (struct gdbarch *g= dbarch, p->control =3D arm_hwbp_control_initialize (mask, arm_hwbp_break, 1); } =20 -/* Get the ARM hardware breakpoint type from the type value we're +/* Get the ARM hardware breakpoint type from the TYPE value we're given when asked to set a watchpoint. */ static arm_hwbp_type=20 arm_linux_get_hwbp_type (enum target_hw_bp_type type) { - if (rw =3D=3D hw_read) + if (type =3D=3D hw_read) return arm_hwbp_load; - else if (rw =3D=3D hw_write) + else if (type =3D=3D hw_write) return arm_hwbp_store; else return arm_hwbp_access; @@ -1168,8 +1168,8 @@ arm_linux_insert_watchpoint (struct target_ops *self, =20 /* Remove a hardware breakpoint. */ static int -arm_linux_remove_watchpoint (struct target_ops *self, - CORE_ADDR addr, int len, int rw, +arm_linux_remove_watchpoint (struct target_ops *self, CORE_ADDR addr, + int len, enum target_hw_bp_type rw, struct expression *cond) { struct lwp_info *lp;