This is the mail archive of the gdb-patches@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]

[PATCH] Fix layout in aarch64-tdep.c


This patch fixes the gripe:

0a1,2
> gdb/aarch64-tdep.c:776: code: OP eol: Do not use &&, or || at the end of a line
gdb/aarch64-tdep.c:776: pv_add_constant (regs[rn], imm)) ||



OK?


/Marcus

ChangeLog:


* aarch64-tdep.c (aarch64_analyze_prologue): Refactor if statement with trailing || operator.
diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
index ac4ed17..ebc78d6 100644
--- a/gdb/aarch64-tdep.c
+++ b/gdb/aarch64-tdep.c
@@ -773,8 +773,10 @@ aarch64_analyze_prologue (struct gdbarch *gdbarch,
 	     (perhaps because rn is not known) then we should abandon
 	     further prologue analysis.  */
 	  if (pv_area_store_would_trash (stack,
-					 pv_add_constant (regs[rn], imm)) ||
-	      pv_area_store_would_trash (stack,
+					 pv_add_constant (regs[rn], imm)))
+	    break;
+
+	  if (pv_area_store_would_trash (stack,
 					 pv_add_constant (regs[rn], imm + 8)))
 	    break;
 

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