2005-01-15 Andrew Cagney <cagney@gnu.org>
[deliverable/binutils-gdb.git] / gdb / i386obsd-tdep.c
index b2c803fe56bae8e42fea003dbf8213c615ee1e87..4c9b88d6152b1247db9849ff92a712871930089e 100644 (file)
@@ -65,6 +65,7 @@ i386obsd_sigtramp_p (struct frame_info *next_frame)
     0x67, 0x00, 0x00, 0x00,    /* movl $SYS_sigreturn, %eax */
     0xcd, 0x80                 /* int $0x80 */
   };
+  size_t buflen = sizeof sigreturn;
   char *name, *buf;
 
   /* If the function has a valid symbol name, it isn't a
@@ -79,22 +80,22 @@ i386obsd_sigtramp_p (struct frame_info *next_frame)
     return 0;
 
   /* Allocate buffer.  */
-  buf = alloca (sizeof sigreturn);
+  buf = alloca (buflen);
 
   /* If we can't read the instructions at START_PC, return zero.  */
-  if (target_read_memory (start_pc + 0x0a, buf, sizeof sigreturn))
+  if (!safe_frame_unwind_memory (next_frame, start_pc + 0x0a, buf, buflen))
     return 0;
 
   /* Check for sigreturn(2).  */
-  if (memcmp (buf, sigreturn, sizeof sigreturn) == 0)
+  if (memcmp (buf, sigreturn, buflen) == 0)
     return 1;
 
   /* If we can't read the instructions at START_PC, return zero.  */
-  if (target_read_memory (start_pc + 0x14, buf, sizeof sigreturn))
+  if (!safe_frame_unwind_memory (next_frame, start_pc + 0x14, buf, buflen))
     return 0;
 
   /* Check for sigreturn(2) (again).  */
-  if (memcmp (buf, sigreturn, sizeof sigreturn) == 0)
+  if (memcmp (buf, sigreturn, buflen) == 0)
     return 1;
 
   return 0;
@@ -238,8 +239,6 @@ i386obsd_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
   i386_elf_init_abi (info, gdbarch);
 
   /* OpenBSD ELF uses SVR4-style shared libraries.  */
-  set_gdbarch_in_solib_call_trampoline
-    (gdbarch, generic_in_solib_call_trampoline);
   set_solib_svr4_fetch_link_map_offsets
     (gdbarch, svr4_ilp32_fetch_link_map_offsets);
 }
This page took 0.024098 seconds and 4 git commands to generate.