From: Klee Dienes Date: Sat, 9 Nov 2002 19:28:22 +0000 (+0000) Subject: 2002-11-09 Klee Dienes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ebe68b2757630eabe111578a463387af99db8d1a;p=binutils-gdb.git 2002-11-09 Klee Dienes * 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). --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 269a613735e..48719cbb751 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2002-11-09 Klee Dienes + + * 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). + 2002-11-09 Andrew Cagney * frame.c (get_prev_frame): Test prev_p to identify a previously diff --git a/gdb/blockframe.c b/gdb/blockframe.c index c2c4542cfc4..29d1c7590f0 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 */