This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Fix ia64 build
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Date: Sun, 30 Mar 2008 23:40:02 -0400
- Subject: [commit] Fix ia64 build
Current GCC versions detect that this array access is out of bounds
and issue an error. I checked in the obvious fix. I found some of
the surrounding instores code suspicious, but I don't know any IA-64
details, so I left it alone - this patch is clear though.
--
Daniel Jacobowitz
CodeSourcery
2008-03-30 Daniel Jacobowitz <dan@codesourcery.com>
* ia64-tdep.c (examine_prologue): Correct array access.
Index: ia64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ia64-tdep.c,v
retrieving revision 1.172
diff -u -p -r1.172 ia64-tdep.c
--- ia64-tdep.c 20 Feb 2008 14:31:40 -0000 1.172
+++ ia64-tdep.c 31 Mar 2008 03:37:23 -0000
@@ -1234,7 +1234,7 @@ examine_prologue (CORE_ADDR pc, CORE_ADD
spill_reg = rN;
last_prologue_pc = next_pc;
}
- else if (qp == 0 && rM >= 32 && rM < 40 && !instores[rM] &&
+ else if (qp == 0 && rM >= 32 && rM < 40 && !instores[rM-32] &&
rN < 256 && imm == 0)
{
/* mov rN, rM where rM is an input register */