This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Enum fix for arm-linux-nat.c


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8156fe7f47884390b7404af15903795bb607658b

commit 8156fe7f47884390b7404af15903795bb607658b
Author: Yao Qi <yao.qi@linaro.org>
Date:   Mon Aug 3 10:37:23 2015 +0100

    Enum fix for arm-linux-nat.c
    
    This patch fixes GDB build breakage on arm-linux.
    
    gdb:
    
    2015-08-03  Yao Qi  <yao.qi@linaro.org>
    
    	* 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:
---
 gdb/ChangeLog       |  7 +++++++
 gdb/arm-linux-nat.c | 10 +++++-----
 2 files changed, 12 insertions(+), 5 deletions(-)

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  <yao.qi@linaro.org>
+
+	* 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  <derodat@adacore.com>
 
 	* 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 *gdbarch,
   p->control = arm_hwbp_control_initialize (mask, arm_hwbp_break, 1);
 }
 
-/* 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 
 arm_linux_get_hwbp_type (enum target_hw_bp_type type)
 {
-  if (rw == hw_read)
+  if (type == hw_read)
     return arm_hwbp_load;
-  else if (rw == hw_write)
+  else if (type == hw_write)
     return arm_hwbp_store;
   else
     return arm_hwbp_access;
@@ -1168,8 +1168,8 @@ arm_linux_insert_watchpoint (struct target_ops *self,
 
 /* 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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]