From 0d540cdfe73cd76ebf5f3b855a4962e590052728 Mon Sep 17 00:00:00 2001 From: Klee Dienes Date: Sat, 12 Oct 2002 01:48:17 +0000 Subject: 2002-10-11 Klee Dienes * findvar.c (read_memory_typed_address): New function. * gdbcore.h (read_memory_typed_address): Add prototype. * blockframe.c (sigtramp_saved_pc): Use read_memory_typed_address to read a value destined for a CORE_ADDR, not read_memory_integer. * f-valprint.c (f77_get_dynamic_upperbound): Ditto. (f77_get_dynamic_lowerbound): Ditto. --- gdb/blockframe.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'gdb/blockframe.c') diff --git a/gdb/blockframe.c b/gdb/blockframe.c index eba45a3..4eb22ac 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -1035,19 +1035,17 @@ sigtramp_saved_pc (struct frame_info *frame) buf = alloca (ptrbytes); /* Get sigcontext address, it is the third parameter on the stack. */ if (frame->next) - sigcontext_addr = read_memory_integer (FRAME_ARGS_ADDRESS (frame->next) - + FRAME_ARGS_SKIP - + sigcontext_offs, - ptrbytes); + sigcontext_addr = read_memory_typed_address + (FRAME_ARGS_ADDRESS (frame->next) + FRAME_ARGS_SKIP + sigcontext_offs, + builtin_type_void_data_ptr); else - sigcontext_addr = read_memory_integer (read_register (SP_REGNUM) - + sigcontext_offs, - ptrbytes); + sigcontext_addr = read_memory_typed_address + (read_register (SP_REGNUM) + sigcontext_offs, builtin_type_void_data_ptr); /* 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_unsigned_integer (buf, ptrbytes); + return extract_typed_address (buf, builtin_type_void_data_ptr); } #endif /* SIGCONTEXT_PC_OFFSET */ -- cgit v1.1