1 // SPDX-License-Identifier: GPL-2.0 1 2 #include <elfutils/libdwfl.h> 3 #include "perf_regs.h" 4 #include "../../../util/unwind-libdw.h" 5 #include "../../../util/perf_regs.h" 6 #include "../../../util/sample.h" 7 8 bool libdw__arch_set_initial_registers(Dwfl_Th 9 { 10 struct unwind_info *ui = arg; 11 struct regs_dump *user_regs = &ui->sam 12 Dwarf_Word dwarf_regs[PERF_REG_ARM_MAX 13 14 #define REG(r) ({ 15 Dwarf_Word val = 0; 16 perf_reg_value(&val, user_regs, PERF_R 17 val; 18 }) 19 20 dwarf_regs[0] = REG(R0); 21 dwarf_regs[1] = REG(R1); 22 dwarf_regs[2] = REG(R2); 23 dwarf_regs[3] = REG(R3); 24 dwarf_regs[4] = REG(R4); 25 dwarf_regs[5] = REG(R5); 26 dwarf_regs[6] = REG(R6); 27 dwarf_regs[7] = REG(R7); 28 dwarf_regs[8] = REG(R8); 29 dwarf_regs[9] = REG(R9); 30 dwarf_regs[10] = REG(R10); 31 dwarf_regs[11] = REG(FP); 32 dwarf_regs[12] = REG(IP); 33 dwarf_regs[13] = REG(SP); 34 dwarf_regs[14] = REG(LR); 35 dwarf_regs[15] = REG(PC); 36 37 return dwfl_thread_state_registers(thr 38 dwa 39 } 40
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.