This is the mail archive of the gdb-patches@sources.redhat.com 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] Minor change to FR-V prologue scanner


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


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