xref: /linux/tools/perf/util/include/dwarf-regs.h (revision 8e07e0e3964ca4e23ce7b68e2096fe660a888942)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _PERF_DWARF_REGS_H_
3 #define _PERF_DWARF_REGS_H_
4 
5 #ifdef HAVE_DWARF_SUPPORT
6 const char *get_arch_regstr(unsigned int n);
7 /*
8  * get_dwarf_regstr - Returns ftrace register string from DWARF regnum
9  * n: DWARF register number
10  * machine: ELF machine signature (EM_*)
11  */
12 const char *get_dwarf_regstr(unsigned int n, unsigned int machine);
13 #endif
14 
15 #ifdef HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET
16 /*
17  * Arch should support fetching the offset of a register in pt_regs
18  * by its name. See kernel's regs_query_register_offset in
19  * arch/xxx/kernel/ptrace.c.
20  */
21 int regs_query_register_offset(const char *name);
22 #endif
23 #endif
24