summaryrefslogtreecommitdiffstats
path: root/libebl/libebl.h
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2013-12-03 14:06:47 +0100
committerJan Kratochvil <jan.kratochvil@redhat.com>2013-12-03 14:06:47 +0100
commit4516ce4755a598fc14ed62839d9160a27079b656 (patch)
tree3f47ef9dde9fb690f59a1ee6b707809a85736206 /libebl/libebl.h
parent47f231a51308e70a24ad087c6d0bc5d934483b50 (diff)
backends/ 2013-11-10 Jan Kratochvil <jan.kratochvil@redhat.com> unwinder: ppc and ppc64 * Makefile.am (ppc_SRCS, ppc64_SRCS): Add ppc_initreg.c. * ppc64_init.c (ppc64_init): Initialize also frame_nregs, set_initial_registers_tid and dwarf_to_regno. * ppc_corenote.c (PRSTATUS_REGSET_ITEMS) <nip>: Set PC_REGISTER. * ppc_init.c (ppc64_init): Initialize also frame_nregs, set_initial_registers_tid and dwarf_to_regno. * ppc_initreg.c: New file. libdwfl/ 2013-11-10 Jan Kratochvil <jan.kratochvil@redhat.com> unwinder: ppc and ppc64 * frame_unwind.c (__libdwfl_frame_reg_get, __libdwfl_frame_reg_set): Call ebl_dwarf_to_regno. * linux-core-attach.c (core_set_initial_registers): Implement pc_register support. * linux-pid-attach.c (pid_thread_state_registers_cb): Implement FIRSTREG -1. libebl/ 2013-11-10 Jan Kratochvil <jan.kratochvil@redhat.com> unwinder: ppc and ppc64 * Makefile.am (gen_SOURCES): Add ebldwarftoregno.c. * ebl-hooks.h (dwarf_to_regno): New. * ebldwarftoregno.c: New file. * libebl.h (Ebl_Core_Item): New field pc_register. (ebl_tid_registers_t): Add FIRSTREG -1 to the comment. (ebl_dwarf_to_regno): New. tests/ 2013-11-10 Jan Kratochvil <jan.kratochvil@redhat.com> * Makefile.am (TESTS): Add run-backtrace-core-ppc64.sh and run-backtrace-core-ppc.sh. (EXTRA_DIST): Add backtrace.ppc.core.bz2, backtrace.ppc.exec.bz2, backtrace.ppc64.core.bz2, backtrace.ppc64.exec.bz2, run-backtrace-core-ppc64.sh and run-backtrace-core-ppc.sh. * backtrace.ppc.core.bz2: New file. * backtrace.ppc.exec.bz2: New file. * backtrace.ppc64.core.bz2: New file. * backtrace.ppc64.exec.bz2: New file. * run-backtrace-core-ppc.sh: New file. * run-backtrace-core-ppc64.sh: New file. Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
Diffstat (limited to 'libebl/libebl.h')
-rw-r--r--libebl/libebl.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/libebl/libebl.h b/libebl/libebl.h
index d8171532..e561ff33 100644
--- a/libebl/libebl.h
+++ b/libebl/libebl.h
@@ -368,6 +368,7 @@ typedef struct
Elf_Type type;
char format;
bool thread_identifier;
+ bool pc_register;
} Ebl_Core_Item;
/* Describe the format of a core file note with the given header and NAME.
@@ -383,7 +384,9 @@ extern int ebl_auxv_info (Ebl *ebl, GElf_Xword a_type,
const char **name, const char **format)
__nonnull_attribute__ (1, 3, 4);
-/* Callback type for ebl_set_initial_registers_tid. */
+/* Callback type for ebl_set_initial_registers_tid.
+ Register -1 is mapped to PC (if arch PC has no DWARF number).
+ If FIRSTREG is -1 then NREGS has to be 1. */
typedef bool (ebl_tid_registers_t) (int firstreg, unsigned nregs,
const Dwarf_Word *regs, void *arg)
__nonnull_attribute__ (3);
@@ -430,6 +433,11 @@ extern const char *ebl_get_symbol (Ebl *ebl, size_t ndx, GElf_Sym *symp,
GElf_Word *shndxp)
__nonnull_attribute__ (1, 3);
+/* Convert *REGNO as is in DWARF to a lower range suitable for
+ Dwarf_Frame->REGS indexing. */
+extern bool ebl_dwarf_to_regno (Ebl *ebl, unsigned *regno)
+ __nonnull_attribute__ (1, 2);
+
#ifdef __cplusplus
}
#endif