aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386nbsd-tdep.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2004-08-06 20:54:16 +0000
committerMark Kettenis <kettenis@gnu.org>2004-08-06 20:54:16 +0000
commit24f9f5e3538cb7eed26f8951315ee73aca8885d6 (patch)
tree90602747562d148384a3d1de3c28a4a9af390637 /gdb/i386nbsd-tdep.c
parentc822af0c707258b74054d5e3bf3f8857ee32191d (diff)
downloadfsf-binutils-gdb-24f9f5e3538cb7eed26f8951315ee73aca8885d6.zip
fsf-binutils-gdb-24f9f5e3538cb7eed26f8951315ee73aca8885d6.tar.gz
fsf-binutils-gdb-24f9f5e3538cb7eed26f8951315ee73aca8885d6.tar.bz2
* i386nbsd-tdep.c (i386nbsd_sigtramp_offset): Change argument from
CORE_ADDR to struct frame_info *. Use safe_frame_unwind_memory instead of deprecated_read_memory_nobpt. (i386nbsd_sigtramp_p): Adjust for changed signature of i386nbsd_sigtramp_offset.
Diffstat (limited to 'gdb/i386nbsd-tdep.c')
-rw-r--r--gdb/i386nbsd-tdep.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gdb/i386nbsd-tdep.c b/gdb/i386nbsd-tdep.c
index 2121273..da7d8c6 100644
--- a/gdb/i386nbsd-tdep.c
+++ b/gdb/i386nbsd-tdep.c
@@ -132,13 +132,14 @@ static const unsigned char sigtramp_retcode[] =
};
static LONGEST
-i386nbsd_sigtramp_offset (CORE_ADDR pc)
+i386nbsd_sigtramp_offset (struct frame_info *next_frame)
{
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
unsigned char ret[sizeof(sigtramp_retcode)], insn;
LONGEST off;
int i;
- if (deprecated_read_memory_nobpt (pc, &insn, 1) != 0)
+ if (!safe_frame_unwind_memory (next_frame, pc, &insn, 1))
return -1;
switch (insn)
@@ -150,7 +151,7 @@ i386nbsd_sigtramp_offset (CORE_ADDR pc)
case RETCODE_INSN2:
/* INSN2 and INSN3 are the same. Read at the location of PC+1
to determine if we're actually looking at INSN2 or INSN3. */
- if (deprecated_read_memory_nobpt (pc + 1, &insn, 1) != 0)
+ if (!safe_frame_unwind_memory (next_frame, pc + 1, &insn, 1))
return -1;
if (insn == RETCODE_INSN3)
@@ -173,7 +174,7 @@ i386nbsd_sigtramp_offset (CORE_ADDR pc)
pc -= off;
- if (deprecated_read_memory_nobpt (pc, (char *) ret, sizeof (ret)) != 0)
+ if (!safe_frame_unwind_memory (next_frame, pc, ret, sizeof (ret)))
return -1;
if (memcmp (ret, sigtramp_retcode, sizeof (ret)) == 0)
@@ -193,7 +194,7 @@ i386nbsd_sigtramp_p (struct frame_info *next_frame)
find_pc_partial_function (pc, &name, NULL, NULL);
return (nbsd_pc_in_sigtramp (pc, name)
- || i386nbsd_sigtramp_offset (pc) >= 0);
+ || i386nbsd_sigtramp_offset (next_frame) >= 0);
}
/* From <machine/signal.h>. */