* i386-tdep.c (i386_get_longjmp_target): Use
authorMark Kettenis <kettenis@gnu.org>
Sat, 19 Apr 2003 14:26:15 +0000 (14:26 +0000)
committerMark Kettenis <kettenis@gnu.org>
Sat, 19 Apr 2003 14:26:15 +0000 (14:26 +0000)
TYPE_LENGTH(builtin_type_void_func_ptr) instead of TARGET_PTR_BIT
and TARGET_CHAR_BIT.  Use extract_typed_address instead of
extract_address.

gdb/ChangeLog
gdb/i386-tdep.c

index e59cf05196011755f1a682b6d54f11a38cb6df51..700bdbac567dd7889358be8d9ce816a480b76426 100644 (file)
@@ -1,3 +1,10 @@
+2003-04-19  Mark Kettenis  <kettenis@gnu.org>
+
+       * i386-tdep.c (i386_get_longjmp_target): Use
+       TYPE_LENGTH(builtin_type_void_func_ptr) instead of TARGET_PTR_BIT
+       and TARGET_CHAR_BIT.  Use extract_typed_address instead of
+       extract_address.
+
 2003-04-19  Mark Kettenis  <kettenis@gnu.org>
 
        * core-regset.c: Update comments to reflect reality.  Re-order
index 475f89c2033363108c4f15b37564425d5416b523..dde3b255de2b6bb7f6c22a6188d1ac57d5c01cdf 100644 (file)
@@ -901,7 +901,7 @@ i386_get_longjmp_target (CORE_ADDR *pc)
   char buf[8];
   CORE_ADDR sp, jb_addr;
   int jb_pc_offset = gdbarch_tdep (current_gdbarch)->jb_pc_offset;
-  int len = TARGET_PTR_BIT / TARGET_CHAR_BIT;
+  int len = TYPE_LENGTH (builtin_type_void_func_ptr);
 
   /* If JB_PC_OFFSET is -1, we have no way to find out where the
      longjmp will land.  */
@@ -912,11 +912,11 @@ i386_get_longjmp_target (CORE_ADDR *pc)
   if (target_read_memory (sp + len, buf, len))
     return 0;
 
-  jb_addr = extract_address (buf, len);
+  jb_addr = extract_typed_address (buf, builtin_type_void_func_ptr);
   if (target_read_memory (jb_addr + jb_pc_offset, buf, len))
     return 0;
 
-  *pc = extract_address (buf, len);
+  *pc = extract_typed_address (buf, builtin_type_void_func_ptr);
   return 1;
 }
 \f
This page took 0.032304 seconds and 4 git commands to generate.