Module Name: src
Committed By: christos
Date: Wed Apr 16 00:34:10 UTC 2014
Modified Files:
src/external/gpl3/gdb/dist/gdb: amd64nbsd-tdep.c
Log Message:
take constant expressions out of the loop.
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c:1.6 src/external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c:1.7
--- src/external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c:1.6 Thu Oct 3 14:30:44 2013
+++ src/external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c Tue Apr 15 20:34:10 2014
@@ -157,19 +157,14 @@ amd64nbsd_trapframe_cache(struct frame_i
addr = sp;
for (i = 0; i < ARRAY_SIZE (amd64nbsd_tf_reg_offset); i++)
- {
- if (amd64nbsd_tf_reg_offset[i] != -1)
- trad_frame_set_reg_addr (cache, i, addr + amd64nbsd_tf_reg_offset[i]);
-
- /* Read %cs and %rip when we have the addresses to hand */
- if (i == AMD64_CS_REGNUM)
- cs = read_memory_unsigned_integer (addr + amd64nbsd_tf_reg_offset[i], 8,
- byte_order);
- if (i == AMD64_RIP_REGNUM)
- rip = read_memory_unsigned_integer (addr + amd64nbsd_tf_reg_offset[i],
- 8, byte_order);
- }
+ if (amd64nbsd_tf_reg_offset[i] != -1)
+ trad_frame_set_reg_addr (cache, i, addr + amd64nbsd_tf_reg_offset[i]);
+ /* Read %cs and %rip when we have the addresses to hand */
+ cs = read_memory_unsigned_integer (addr
+ + amd64nbsd_tf_reg_offset[AMD64_CS_REGNUM], 8, byte_order);
+ rip = read_memory_unsigned_integer (addr
+ + amd64nbsd_tf_reg_offset[AMD64_RIP_REGNUM], 8, byte_order);
if (cs == 0 || rip == 0)
abort();