ppc64_SRCS = ppc64_init.c ppc64_symbol.c ppc64_retval.c \
ppc64_corenote.c ppc_regs.c ppc_auxv.c ppc_attrs.c ppc_syscall.c \
- ppc_frame_state.c ppc_cfi.c ppc64_get_func_pc.c
- ppc64_get_func_pc.c
++ ppc64_get_func_pc.c ppc_frame_state.c ppc_cfi.c
libebl_ppc64_pic_a_SOURCES = $(ppc64_SRCS)
am_libebl_ppc64_pic_a_OBJECTS = $(ppc64_SRCS:.c=.os)
- s390_SRCS = s390_init.c s390_symbol.c s390_regs.c s390_retval.c s390_cfi.c \
- s390_frame_state.c s390_corenote.c s390x_corenote.c \
+ s390_SRCS = s390_init.c s390_symbol.c s390_regs.c s390_retval.c \
- s390_corenote.c s390x_corenote.c
++ s390_corenote.c s390x_corenote.c s390_cfi.c s390_frame_state.c \
+ s390_frame_unwind.c
libebl_s390_pic_a_SOURCES = $(s390_SRCS)
am_libebl_s390_pic_a_OBJECTS = $(s390_SRCS:.c=.os)
HOOK (eh, syscall_abi);
HOOK (eh, core_note);
HOOK (eh, auxv_info);
+ HOOK (eh, get_func_pc);
+ HOOK (eh, destr);
+ /* gcc/config/ #define DWARF_FRAME_REGISTERS. */
+ eh->frame_state_nregs = (114 - 1) + 32;
+ HOOK (eh, frame_state);
+ HOOK (eh, abi_cfi);
+ HOOK (eh, frame_dwarf_to_regno);
+ HOOK (eh, get_func_pc);
+ HOOK (eh, destr);
return MODVERSION;
}
HOOK (eh, reloc_simple_type);
HOOK (eh, register_info);
HOOK (eh, return_value_location);
- if (eh->class == ELFCLASS64)
- {
- __typeof (s390_core_note) s390x_core_note;
- eh->core_note = s390x_core_note;
- }
- else
- HOOK (eh, core_note);
+ if (eh->class == ELFCLASS64)
+ eh->core_note = s390x_core_note;
+ else
+ HOOK (eh, core_note);
+ HOOK (eh, abi_cfi);
+ /* gcc/config/ #define DWARF_FRAME_REGISTERS 34.
+ But from the gcc/config/s390/s390.h "Register usage." comment it looks as
+ if #32 (Argument pointer) and #33 (Condition code) are not used for
+ unwinding. */
+ eh->frame_state_nregs = 32;
+ HOOK (eh, frame_state);
+ HOOK (eh, normalize_pc);
+ HOOK (eh, frame_unwind);
/* Only the 64-bit format uses the incorrect hash table entry size. */
if (eh->class == ELFCLASS64)
eblreginfo.c eblnonerelocp.c eblrelativerelocp.c \
eblsysvhashentrysize.c eblauxvinfo.c eblcheckobjattr.c \
ebl_check_special_section.c ebl_syscall_abi.c eblabicfi.c \
- eblstother.c eblframestate.c eblgetfuncpc.c eblnormalizepc.c \
- eblstother.c eblgetfuncpc.c
++ eblstother.c eblgetfuncpc.c eblframestate.c eblnormalizepc.c \
+ eblframeunwind.c eblframedwarftoregno.c
libebl_a_SOURCES = $(gen_SOURCES)
/* Supply the machine-specific state of CFI before CIE initial programs. */
int EBLHOOK(abi_cfi) (Ebl *ebl, Dwarf_CIE *abi_info);
- /* *SYM must be STT_FUNC. Then if it describes a function descriptor (PPC64)
- convert in-place its data and return a possibly different new name for it.
- The name is valid as long as EBL is valid. */
- const char *EBLHOOK(get_func_pc) (Ebl *ebl, Dwfl_Module *mod, GElf_Sym *sym);
-
+ /* *SYM must be STT_FUNC. Then if it describes a function descriptor (PPC64)
+ convert in-place its data and return a possibly different new name for it.
+ The name is valid as long as EBL is valid. */
+ const char *EBLHOOK(get_func_pc) (Ebl *ebl, struct Dwfl_Module *mod,
+ GElf_Sym *sym);
+
+/* Fetch process data from STATE->base->pid or STATE->base->core. */
+bool EBLHOOK(frame_state) (Dwarf_Frame_State *state);
+
+/* Number of Dwarf_Frame_State->regs entries to allocate for frame_state
+ above. */
+size_t EBLHOOKVAR(frame_state_nregs);
+
+/* Convert *REGNO as is in DWARF to a lower range suitable for
+ Dwarf_Frame_State->REGS indexing. RETURN_ADDRESS_REGISTER should not change
+ on second call; other registers may map to numbers invalid on input. */
+bool EBLHOOK(frame_dwarf_to_regno) (Ebl *ebl, unsigned *regno);
+
-
+/* Optionally modify *PC as fetched from inferior data into valid PC
+ instruction pointer. */
+void EBLHOOK(normalize_pc) (Ebl *ebl, Dwarf_Addr *pc);
+
+/* See dwfl_frame_unwind. */
+bool
+ EBLHOOK(frame_unwind) (Ebl *ebl, Dwarf_Frame_State **statep, Dwarf_Addr pc,
+ bool
+ (*memory_read) (Dwarf_Frame_State_Process *process,
+ Dwarf_Addr addr,
+ Dwarf_Addr *result));
+
/* Destructor for ELF backend handle. */
void EBLHOOK(destr) (struct ebl *);
+
+#ifdef EBLHOOKVAR_STUB
+# undef EBLHOOKVAR
+# undef EBLHOOKVAR_STUB
+#endif
const char **name, const char **format)
__nonnull_attribute__ (1, 3, 4);
- /* Convert function descriptor to the function PC value. */
- extern const char *ebl_get_func_pc (Ebl *ebl, Dwfl_Module *mod, GElf_Sym *sym)
- __nonnull_attribute__ (1, 2, 3);
-
+ /* Convert function descriptor SYM to the function PC value in-place. */
+ struct Dwfl_Module;
+ extern const char *ebl_get_func_pc (Ebl *ebl, struct Dwfl_Module *mod,
+ GElf_Sym *sym)
+ __nonnull_attribute__ (1, 2, 3);
+
+/* Fetch process data from STATE->base->pid or STATE->base->core. */
+extern bool ebl_frame_state (Dwarf_Frame_State *state)
+ __nonnull_attribute__ (1);
+
+/* Number of registers to allocate for STATE of ebl_frame_state. */
+extern size_t ebl_frame_state_nregs (Ebl *ebl)
+ __nonnull_attribute__ (1);
+
+/* Modify PC as fetched from inferior data into valid PC. */
+extern void ebl_normalize_pc (Ebl *ebl, Dwarf_Addr *pc)
+ __nonnull_attribute__ (1, 2);
+
+/* Get previous frame state for an existing frame state. */
+extern bool
+ ebl_frame_unwind (Ebl *ebl, Dwarf_Frame_State **statep, Dwarf_Addr pc,
+ bool (*memory_read) (Dwarf_Frame_State_Process *process,
+ Dwarf_Addr addr, Dwarf_Addr *result))
+ __nonnull_attribute__ (1, 2, 4);
+
+/* Convert *REGNO as is in DWARF to a lower range. */
+extern bool ebl_frame_dwarf_to_regno (Ebl *ebl, unsigned *regno)
+ __nonnull_attribute__ (1, 2);
#ifdef __cplusplus
}