Files
clang-p2996/lldb/test/Shell/ExecControl/StepIn/Inputs/aarch64_thunk.cc
Vincent Belliard b22a6f1eba [lldb] fix step in AArch64 trampoline (#90783)
Detects AArch64 trampolines in order to be able to step in a function
through a trampoline on AArch64.

---------

Co-authored-by: Vincent Belliard <v-bulle@github.com>
2024-05-07 13:42:16 +01:00

16 lines
301 B
C++

extern "C" int __attribute__((naked)) __AArch64ADRPThunk_step_here() {
asm (
"adrp x16, step_here\n"
"add x16, x16, :lo12:step_here\n"
"br x16"
);
}
extern "C" __attribute__((used)) int step_here() {
return 47;
}
int main() {
return __AArch64ADRPThunk_step_here();
}