diff options
author | Klee Dienes <kdienes@apple.com> | 2002-11-09 19:28:22 +0000 |
---|---|---|
committer | Klee Dienes <kdienes@apple.com> | 2002-11-09 19:28:22 +0000 |
commit | ebe68b2757630eabe111578a463387af99db8d1a (patch) | |
tree | 0a6abd7b1529ce69e9c562ef005d6632c58795bb /gdb/blockframe.c | |
parent | 82661bd0df129895e5a2c55ddfa5eb1f3760b5b4 (diff) | |
download | gdb-ebe68b2757630eabe111578a463387af99db8d1a.zip gdb-ebe68b2757630eabe111578a463387af99db8d1a.tar.gz gdb-ebe68b2757630eabe111578a463387af99db8d1a.tar.bz2 |
2002-11-09 Klee Dienes <kdienes@apple.com>
* blockframe.c (sigtramp_saved_pc): Use
builtin_type_void_code_ptr, not builtin_type_void_data_ptr (we are
extracting the PC). Use TYPE_LENGTH (builtin_type_void_code_ptr)
instead of (TARGET_PTR_BIT / TARGET_CHAR_BIT).
Diffstat (limited to 'gdb/blockframe.c')
-rw-r--r-- | gdb/blockframe.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/blockframe.c b/gdb/blockframe.c index c2c4542..29d1c75 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -668,7 +668,7 @@ sigtramp_saved_pc (struct frame_info *frame) { CORE_ADDR sigcontext_addr; char *buf; - int ptrbytes = TARGET_PTR_BIT / TARGET_CHAR_BIT; + int ptrbytes = TYPE_LENGTH (builtin_type_void_code_ptr); int sigcontext_offs = (2 * TARGET_INT_BIT) / TARGET_CHAR_BIT; buf = alloca (ptrbytes); @@ -684,7 +684,7 @@ sigtramp_saved_pc (struct frame_info *frame) /* Don't cause a memory_error when accessing sigcontext in case the stack layout has changed or the stack is corrupt. */ target_read_memory (sigcontext_addr + SIGCONTEXT_PC_OFFSET, buf, ptrbytes); - return extract_typed_address (buf, builtin_type_void_data_ptr); + return extract_typed_address (buf, builtin_type_void_code_ptr); } #endif /* SIGCONTEXT_PC_OFFSET */ |