[PATCH 036/238] [index] i386-tdep.c: -Wshadow fix
Andrey Smirnov
andrew.smirnov@gmail.com
Tue Dec 13 03:41:00 GMT 2011
To ChangeLog:
* i386-tdep.c (i386_record_lea_modrm_addr): Rename `index' to
`idx'(-Wshadow).
---
gdb/i386-tdep.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index a4e3a22..e28a257 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -3621,7 +3621,7 @@ i386_record_lea_modrm_addr (struct i386_record_s *irp, uint64_t *addr)
int havesib = 0;
uint8_t scale = 0;
uint8_t byte;
- uint8_t index = 0;
+ uint8_t idx = 0;
uint8_t base = irp->rm;
if (base == 4)
@@ -3637,7 +3637,7 @@ i386_record_lea_modrm_addr (struct i386_record_s *irp, uint64_t *addr)
}
irp->addr++;
scale = (byte >> 6) & 3;
- index = ((byte >> 3) & 7) | irp->rex_x;
+ idx = ((byte >> 3) & 7) | irp->rex_x;
base = (byte & 7);
}
base |= irp->rex_b;
@@ -3703,9 +3703,9 @@ i386_record_lea_modrm_addr (struct i386_record_s *irp, uint64_t *addr)
else
*addr = (uint32_t) (offset64 + *addr);
- if (havesib && (index != 4 || scale != 0))
+ if (havesib && (idx != 4 || scale != 0))
{
- regcache_raw_read_unsigned (irp->regcache, irp->regmap[index],
+ regcache_raw_read_unsigned (irp->regcache, irp->regmap[idx],
&offset64);
if (irp->aflag == 2)
*addr += offset64 << scale;
--
1.7.5.4
More information about the Gdb-patches
mailing list