/* Target-dependent code for GDB, the GNU debugger.
- Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by D.J. Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com)
for IBM Deutschland Entwicklung GmbH, IBM Corporation.
#include "target.h"
#include "gdbcore.h"
#include "gdbcmd.h"
-#include "symfile.h"
#include "objfiles.h"
#include "tm.h"
#include "../bfd/bfd.h"
&& get_frame_extra_info (next_frame)->sigcontext)
{
/* We're definitely backtracing from a signal handler. */
- CORE_ADDR *saved_regs = get_frame_saved_regs (fi);
+ CORE_ADDR *saved_regs = deprecated_get_frame_saved_regs (fi);
CORE_ADDR save_reg_addr = (get_frame_extra_info (next_frame)->sigcontext
+ DEPRECATED_REGISTER_BYTE (S390_GP0_REGNUM));
int reg;
- the analysis gave us enough information to actually figure it
out. */
if (fi
- && get_frame_saved_regs (fi)
+ && deprecated_get_frame_saved_regs (fi)
&& original_sp != -1)
{
int slot_num;
CORE_ADDR slot_addr;
- CORE_ADDR *saved_regs = get_frame_saved_regs (fi);
+ CORE_ADDR *saved_regs = deprecated_get_frame_saved_regs (fi);
/* Scan the spill array; if a spill slot says it holds the
original value of some register, then record that slot's
}
-
-static CORE_ADDR
-s390_function_start (struct frame_info *fi)
-{
- CORE_ADDR function_start = 0;
-
- if (get_frame_extra_info (fi) && get_frame_extra_info (fi)->initialised)
- function_start = get_frame_extra_info (fi)->function_start;
- else if (get_frame_pc (fi))
- function_start = get_frame_func (fi);
- return function_start;
-}
-
-
-
-
static int
s390_frameless_function_invocation (struct frame_info *fi)
{
int quick;
- if (get_frame_saved_regs (fi) == NULL)
+ if (deprecated_get_frame_saved_regs (fi) == NULL)
{
/* zalloc memsets the saved regs */
frame_saved_regs_zalloc (fi);
{
get_frame_extra_info (fi)->saved_pc_valid = 1;
if (get_frame_extra_info (fi)->good_prologue
- && get_frame_saved_regs (fi)[S390_RETADDR_REGNUM])
+ && deprecated_get_frame_saved_regs (fi)[S390_RETADDR_REGNUM])
get_frame_extra_info (fi)->saved_pc
= ADDR_BITS_REMOVE (read_memory_integer
- (get_frame_saved_regs (fi)[S390_RETADDR_REGNUM],
+ (deprecated_get_frame_saved_regs (fi)[S390_RETADDR_REGNUM],
S390_GPR_SIZE));
else
get_frame_extra_info (fi)->saved_pc
}
else
{
- if (get_frame_saved_regs (thisframe))
+ if (deprecated_get_frame_saved_regs (thisframe))
{
int regno;
if (prev_fextra_info.frame_pointer_saved_pc
- && get_frame_saved_regs (thisframe)[S390_FRAME_REGNUM])
+ && deprecated_get_frame_saved_regs (thisframe)[S390_FRAME_REGNUM])
regno = S390_FRAME_REGNUM;
else
regno = S390_SP_REGNUM;
- if (get_frame_saved_regs (thisframe)[regno])
+ if (deprecated_get_frame_saved_regs (thisframe)[regno])
{
/* The SP's entry of `saved_regs' is special. */
if (regno == S390_SP_REGNUM)
- prev_fp = get_frame_saved_regs (thisframe)[regno];
+ prev_fp = deprecated_get_frame_saved_regs (thisframe)[regno];
else
prev_fp =
- read_memory_integer (get_frame_saved_regs (thisframe)[regno],
+ read_memory_integer (deprecated_get_frame_saved_regs (thisframe)[regno],
S390_GPR_SIZE);
}
}
+/* NOTE: cagney/2003-10-31: "return_value" makes
+ "extract_struct_value_address", "extract_return_value", and
+ "use_struct_convention" redundant. */
+static CORE_ADDR
+s390_cannot_extract_struct_value_address (struct regcache *regcache)
+{
+ return 0;
+}
+
/* a given return value in `regbuf' with a type `valtype', extract and copy its
value into `valbuf' */
static void
write_register (S390_PC_REGNUM, DEPRECATED_FRAME_SAVED_PC (frame));
/* Restore any saved registers. */
- if (get_frame_saved_regs (frame))
+ if (deprecated_get_frame_saved_regs (frame))
{
for (regnum = 0; regnum < NUM_REGS; regnum++)
- if (get_frame_saved_regs (frame)[regnum] != 0)
+ if (deprecated_get_frame_saved_regs (frame)[regnum] != 0)
{
ULONGEST value;
- value = read_memory_unsigned_integer (get_frame_saved_regs (frame)[regnum],
- REGISTER_RAW_SIZE (regnum));
+ value = read_memory_unsigned_integer (deprecated_get_frame_saved_regs (frame)[regnum],
+ DEPRECATED_REGISTER_RAW_SIZE (regnum));
write_register (regnum, value);
}
/* Actually cut back the stack. Remember that the SP's element of
saved_regs is the old SP itself, not the address at which it is
saved. */
- write_register (S390_SP_REGNUM, get_frame_saved_regs (frame)[S390_SP_REGNUM]);
+ write_register (S390_SP_REGNUM, deprecated_get_frame_saved_regs (frame)[S390_SP_REGNUM]);
}
/* Throw away any cached frame information. */
/* NOTE: cagney/2002-12-06: This can be deleted when this arch is
ready to unwind the PC first (see frame.c:get_prev_frame()). */
- set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_default);
+ set_gdbarch_deprecated_init_frame_pc (gdbarch, deprecated_init_frame_pc_default);
set_gdbarch_believe_pcc_promotion (gdbarch, 0);
set_gdbarch_char_signed (gdbarch, 0);
- set_gdbarch_frame_args_skip (gdbarch, 0);
set_gdbarch_deprecated_frame_chain (gdbarch, s390_frame_chain);
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, s390_frame_init_saved_regs);
set_gdbarch_deprecated_store_struct_return (gdbarch, s390_store_struct_return);
set_gdbarch_deprecated_pop_frame (gdbarch, s390_pop_frame);
/* Stack grows downward. */
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- /* Offset from address of function to start of its code.
- Zero on most machines. */
- set_gdbarch_function_start_offset (gdbarch, 0);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 8);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 8);
set_gdbarch_breakpoint_from_pc (gdbarch, s390_breakpoint_from_pc);
set_gdbarch_stab_reg_to_regnum (gdbarch, s390_stab_reg_to_regnum);
set_gdbarch_dwarf_reg_to_regnum (gdbarch, s390_stab_reg_to_regnum);
set_gdbarch_dwarf2_reg_to_regnum (gdbarch, s390_stab_reg_to_regnum);
- set_gdbarch_deprecated_extract_struct_value_address
- (gdbarch, generic_cannot_extract_struct_value_address);
+ set_gdbarch_deprecated_extract_struct_value_address (gdbarch, s390_cannot_extract_struct_value_address);
/* Parameters for inferior function calls. */
set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);