/* Target dependent code for the NS32000, for GDB.
- Copyright 1986, 1988, 1991, 1992, 1994, 1995, 1998, 1999, 2000, 2001,
- 2002, 2003 Free Software Foundation, Inc.
+
+ Copyright 1986, 1988, 1991, 1992, 1994, 1995, 1998, 1999, 2000,
+ 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
/* In the case of the NS32000 series, the frame's nominal address is the
FP value, and that address is saved at the previous FP value as a
4-byte word. */
-
- if (deprecated_inside_entry_file (get_frame_pc (frame)))
- return 0;
-
return (read_memory_integer (get_frame_base (frame), 4));
}
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
+ /* Offset to saved PC in sigcontext, from <machine/signal.h>. 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);
+ target_read_memory (sigcontext_addr + 20, buf, ptrbytes);
return extract_typed_address (buf, builtin_type_void_func_ptr);
}
TYPE_LENGTH (valtype));
}
-static CORE_ADDR
-ns32k_extract_struct_value_address (char *regbuf)
-{
- return (extract_unsigned_integer (regbuf + DEPRECATED_REGISTER_BYTE (0), DEPRECATED_REGISTER_RAW_SIZE (0)));
-}
-\f
void
ns32k_gdbarch_init_32082 (struct gdbarch *gdbarch)
{
set_gdbarch_deprecated_saved_pc_after_call (gdbarch, ns32k_saved_pc_after_call);
set_gdbarch_frame_num_args (gdbarch, umax_frame_num_args);
- set_gdbarch_frameless_function_invocation (gdbarch,
- generic_frameless_function_invocation_not);
set_gdbarch_deprecated_frame_chain (gdbarch, ns32k_frame_chain);
set_gdbarch_deprecated_frame_saved_pc (gdbarch, ns32k_frame_saved_pc);
set_gdbarch_deprecated_store_struct_return (gdbarch, ns32k_store_struct_return);
set_gdbarch_deprecated_extract_return_value (gdbarch, ns32k_extract_return_value);
set_gdbarch_deprecated_store_return_value (gdbarch, ns32k_store_return_value);
- set_gdbarch_deprecated_extract_struct_value_address (gdbarch,
- ns32k_extract_struct_value_address);
/* Call dummy info */
set_gdbarch_deprecated_push_dummy_frame (gdbarch, ns32k_push_dummy_frame);