+2004-02-26 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in: Update dependencies.
+ Changes from Ulrich Weigand,
+ * s390-tdep.c: Include "dwarf2-frame.h".
+ (s390_dwarf2_frame_init_reg): New function.
+ (s390_gdbarch_init): Install dwarf2_frame_sniffer and
+ dwarf2_frame_base_sniffer. Call dwarf2_frame_set_init_reg.
+
2004-02-26 Jeff Johnston <jjohnstn@redhat.com>
* breakpoint.c (pending_break_support): New setting variable.
ada_lang_h = ada-lang.h $(value_h) $(gdbtypes_h)
alphabsd_tdep_h = alphabsd-tdep.h
alpha_tdep_h = alpha-tdep.h
+amd64_linux_tdep_h = amd64-linux-tdep.h
amd64_nat_h = amd64-nat.h
+amd64_tdep_h = amd64-tdep.h $(i386_tdep_h)
annotate_h = annotate.h $(symtab_h) $(gdbtypes_h)
arch_utils_h = arch-utils.h
arm_tdep_h = arm-tdep.h
version_h = version.h
wince_stub_h = wince-stub.h
wrapper_h = wrapper.h $(gdb_h)
-amd64_linux_tdep_h = amd64-linux-tdep.h
-amd64_tdep_h = amd64-tdep.h $(i386_tdep_h)
xcoffsolib_h = xcoffsolib.h
xmodem_h = xmodem.h
$(regcache_h) $(linux_nat_h) $(gdb_assert_h) $(gdb_string_h) \
$(gdb_proc_service_h) $(gregset_h) $(amd64_tdep_h) \
$(amd64_linux_tdep_h) $(i386_linux_tdep_h) $(amd64_nat_h)
-amd64-linux-tdep.o: amd64-linux-tdep.c $(defs_h) $(inferior_h) \
- $(gdbcore_h) $(regcache_h) $(osabi_h) $(gdb_string_h) \
- $(amd64_tdep_h) $(amd64_linux_tdep_h)
+amd64-linux-tdep.o: amd64-linux-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \
+ $(regcache_h) $(osabi_h) $(gdb_string_h) $(amd64_tdep_h) \
+ $(amd64_linux_tdep_h)
amd64-nat.o: amd64-nat.c $(defs_h) $(gdbarch_h) $(regcache_h) \
$(gdb_assert_h) $(i386_tdep_h) $(amd64_tdep_h)
amd64nbsd-nat.o: amd64nbsd-nat.c $(defs_h) $(gdb_assert_h) $(amd64_tdep_h) \
ia64-linux-nat.o: ia64-linux-nat.c $(defs_h) $(gdb_string_h) $(inferior_h) \
$(target_h) $(gdbcore_h) $(regcache_h) $(gdb_wait_h) $(gregset_h)
ia64-linux-tdep.o: ia64-linux-tdep.c $(defs_h) $(ia64_tdep_h) \
- $(arch_utils_h) $(gdbcore_h)
+ $(arch_utils_h) $(gdbcore_h) $(regcache_h)
ia64-tdep.o: ia64-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \
$(arch_utils_h) $(floatformat_h) $(regcache_h) $(reggroups_h) \
$(frame_h) $(frame_base_h) $(frame_unwind_h) $(doublest_h) \
s390-tdep.o: s390-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) $(inferior_h) \
$(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(objfiles_h) \
$(tm_h) $(__bfd_bfd_h) $(floatformat_h) $(regcache_h) \
- $(trad_frame_h) $(frame_base_h) $(frame_unwind_h) $(reggroups_h) \
- $(regset_h) $(value_h) $(gdb_assert_h) $(dis_asm_h) $(solib_svr4_h) \
- $(s390_tdep_h)
+ $(trad_frame_h) $(frame_base_h) $(frame_unwind_h) $(dwarf2_frame_h) \
+ $(reggroups_h) $(regset_h) $(value_h) $(gdb_assert_h) $(dis_asm_h) \
+ $(solib_svr4_h) $(s390_tdep_h)
scm-exp.o: scm-exp.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
$(parser_defs_h) $(language_h) $(value_h) $(c_lang_h) $(scm_lang_h) \
$(scm_tags_h)
#include "trad-frame.h"
#include "frame-base.h"
#include "frame-unwind.h"
+#include "dwarf2-frame.h"
#include "reggroups.h"
#include "regset.h"
#include "value.h"
}
+/* DWARF-2 frame support. */
+
+static void
+s390_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
+ struct dwarf2_frame_state_reg *reg)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ switch (tdep->abi)
+ {
+ case ABI_LINUX_S390:
+ /* Call-saved registers. */
+ if ((regnum >= S390_R6_REGNUM && regnum <= S390_R15_REGNUM)
+ || regnum == S390_F4_REGNUM
+ || regnum == S390_F6_REGNUM)
+ reg->how = DWARF2_FRAME_REG_SAME_VALUE;
+
+ /* Call-clobbered registers. */
+ else if ((regnum >= S390_R0_REGNUM && regnum <= S390_R5_REGNUM)
+ || (regnum >= S390_F0_REGNUM && regnum <= S390_F15_REGNUM
+ && regnum != S390_F4_REGNUM && regnum != S390_F6_REGNUM))
+ reg->how = DWARF2_FRAME_REG_UNDEFINED;
+
+ /* The return address column. */
+ else if (regnum == S390_PC_REGNUM)
+ reg->how = DWARF2_FRAME_REG_RA;
+ break;
+
+ case ABI_LINUX_ZSERIES:
+ /* Call-saved registers. */
+ if ((regnum >= S390_R6_REGNUM && regnum <= S390_R15_REGNUM)
+ || (regnum >= S390_F8_REGNUM && regnum <= S390_F15_REGNUM))
+ reg->how = DWARF2_FRAME_REG_SAME_VALUE;
+
+ /* Call-clobbered registers. */
+ else if ((regnum >= S390_R0_REGNUM && regnum <= S390_R5_REGNUM)
+ || (regnum >= S390_F0_REGNUM && regnum <= S390_F7_REGNUM))
+ reg->how = DWARF2_FRAME_REG_UNDEFINED;
+
+ /* The return address column. */
+ else if (regnum == S390_PC_REGNUM)
+ reg->how = DWARF2_FRAME_REG_RA;
+ break;
+ }
+}
+
+
/* Dummy function calls. */
/* Return non-zero if TYPE is an integer-like type, zero otherwise.
/* Frame handling. */
set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
+ dwarf2_frame_set_init_reg (gdbarch, s390_dwarf2_frame_init_reg);
+ frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer);
+ frame_base_append_sniffer (gdbarch, dwarf2_frame_base_sniffer);
frame_unwind_append_sniffer (gdbarch, s390_pltstub_frame_sniffer);
frame_unwind_append_sniffer (gdbarch, s390_sigtramp_frame_sniffer);
frame_unwind_append_sniffer (gdbarch, s390_frame_sniffer);