diff options
| author | Alexandre Chartre <alexandre.chartre@oracle.com> | 2025-11-21 10:53:22 +0100 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2025-11-21 15:30:10 +0100 |
| commit | 26a453fb5637907a538d6ea5ef23651142811e15 (patch) | |
| tree | 73fdb0ff0a96ea939f4a339c2bbcb4a50ba75254 /tools/objtool/arch/x86 | |
| parent | fcb268b47a2f4a497fdb40ef24bb9e06488b7213 (diff) | |
objtool: Improve register reporting during function validation
When tracing function validation, instruction state changes can
report changes involving registers. These registers are reported
with the name "r<num>" (e.g. "r3"). Print the CPU specific register
name instead of a generic name (e.g. print "rbx" instead of "r3"
on x86).
Signed-off-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
Link: https://patch.msgid.link/20251121095340.464045-13-alexandre.chartre@oracle.com
Diffstat (limited to 'tools/objtool/arch/x86')
| -rw-r--r-- | tools/objtool/arch/x86/decode.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/objtool/arch/x86/decode.c b/tools/objtool/arch/x86/decode.c index 83e9c604ce10..f4af82508228 100644 --- a/tools/objtool/arch/x86/decode.c +++ b/tools/objtool/arch/x86/decode.c @@ -23,6 +23,14 @@ #include <objtool/builtin.h> #include <arch/elf.h> +const char *arch_reg_name[CFI_NUM_REGS] = { + "rax", "rcx", "rdx", "rbx", + "rsp", "rbp", "rsi", "rdi", + "r8", "r9", "r10", "r11", + "r12", "r13", "r14", "r15", + "ra" +}; + int arch_ftrace_match(const char *name) { return !strcmp(name, "__fentry__"); |
