This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Minor change to FR-V prologue scanner
- From: Kevin Buettner <kevinb at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 15 Mar 2004 11:50:22 -0700
- Subject: [PATCH] Minor change to FR-V prologue scanner
- Organization: Red Hat
I've just committed the patch below...
* frv-tdep.c (frv_analyze_prologue): Terminate prologue scan,
but not via a call to error(), when unable to read memory.
Index: frv-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/frv-tdep.c,v
retrieving revision 1.77
diff -u -p -r1.77 frv-tdep.c
--- frv-tdep.c 15 Mar 2004 18:31:37 -0000 1.77
+++ frv-tdep.c 15 Mar 2004 18:43:46 -0000
@@ -511,7 +511,13 @@ frv_analyze_prologue (CORE_ADDR pc, stru
/* Scan the prologue. */
while (pc < lim_pc)
{
- LONGEST op = read_memory_integer (pc, 4);
+ char buf[frv_instr_size];
+ LONGEST op;
+
+ if (target_read_memory (pc, buf, sizeof buf) != 0)
+ break;
+ op = extract_signed_integer (buf, sizeof buf);
+
next_pc = pc + 4;
/* The tests in this chain of ifs should be in order of