diff options
author | Mark Kettenis <kettenis@gnu.org> | 2003-04-19 14:26:15 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2003-04-19 14:26:15 +0000 |
commit | f9d3c2a8add970641c8c508ab8cd71b433f8ee93 (patch) | |
tree | 05518ea694acd12bad4879ff8d00bf166dd1e678 /gdb/i386-tdep.c | |
parent | 94ba74a9fa6ebe547ec15e8c5cf41a69878aeb80 (diff) | |
download | gdb-f9d3c2a8add970641c8c508ab8cd71b433f8ee93.zip gdb-f9d3c2a8add970641c8c508ab8cd71b433f8ee93.tar.gz gdb-f9d3c2a8add970641c8c508ab8cd71b433f8ee93.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/i386-tdep.c')
-rw-r--r-- | gdb/i386-tdep.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 475f89c..dde3b25 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -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; } |