This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] mn10300: Eliminate use of deprecated_read_memory_nobpt()
- From: Kevin Buettner <kevinb at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 6 Sep 2005 15:07:41 -0700
- Subject: [commit] mn10300: Eliminate use of deprecated_read_memory_nobpt()
I've just committed the patch below.
* mn10300-tdep.c (mn10300_analyze_prologue): Use
safe_frame_unwind_memory() in place of deprecated_read_memory_nobpt().
Index: mn10300-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mn10300-tdep.c,v
retrieving revision 1.131
diff -u -p -r1.131 mn10300-tdep.c
--- mn10300-tdep.c 3 Sep 2005 01:55:26 -0000 1.131
+++ mn10300-tdep.c 6 Sep 2005 21:56:41 -0000
@@ -554,8 +554,7 @@ mn10300_analyze_prologue (struct frame_i
#if 0
/* Get the next two bytes into buf, we need two because rets is a two
byte insn and the first isn't enough to uniquely identify it. */
- status = deprecated_read_memory_nobpt (pc, buf, 2);
- if (status != 0)
+ if (!safe_frame_unwind_memory (fi, pc, buf, 2))
return pc;
/* Note: kevinb/2003-07-16: We shouldn't be making these sorts of
@@ -596,8 +595,7 @@ mn10300_analyze_prologue (struct frame_i
addr = func_addr;
/* Suck in two bytes. */
- if (addr + 2 >= stop
- || (status = deprecated_read_memory_nobpt (addr, buf, 2)) != 0)
+ if (addr + 2 >= stop || !safe_frame_unwind_memory (fi, addr, buf, 2))
goto finish_prologue;
/* First see if this insn sets the stack pointer from a register; if
@@ -627,8 +625,7 @@ mn10300_analyze_prologue (struct frame_i
goto finish_prologue;
/* Get the next two bytes so the prologue scan can continue. */
- status = deprecated_read_memory_nobpt (addr, buf, 2);
- if (status != 0)
+ if (!safe_frame_unwind_memory (fi, addr, buf, 2))
goto finish_prologue;
}
@@ -648,8 +645,7 @@ mn10300_analyze_prologue (struct frame_i
goto finish_prologue;
/* Get two more bytes so scanning can continue. */
- status = deprecated_read_memory_nobpt (addr, buf, 2);
- if (status != 0)
+ if (!safe_frame_unwind_memory (fi, addr, buf, 2))
goto finish_prologue;
}
@@ -675,8 +671,7 @@ mn10300_analyze_prologue (struct frame_i
{
/* Suck in imm_size more bytes, they'll hold the size of the
current frame. */
- status = deprecated_read_memory_nobpt (addr + 2, buf, imm_size);
- if (status != 0)
+ if (!safe_frame_unwind_memory (fi, addr + 2, buf, imm_size))
goto finish_prologue;
/* Note the size of the stack in the frame info structure. */