Skip to content

Commit b903bad

Browse files
committed
[lldb] Attempt to fix signal-in-leaf-function-aarch64 on darwin
Convert settings set EXC_BAD_INSTRUCTION to SIGILL so we get uniform behavior (and can resume the inferior). Fix a "omitting the parameter name in a function definition is a C23 extension" warning as a drive-by.
1 parent 80f9e81 commit b903bad

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lldb/test/Shell/Unwind/Inputs/signal-in-leaf-function-aarch64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ int __attribute__((naked)) signal_generating_add(int a, int b) {
77
"ret");
88
}
99

10-
void sigill_handler(int) { _exit(0); }
10+
void sigill_handler(int signo) { _exit(0); }
1111

1212
int main() {
1313
signal(SIGILL, sigill_handler);

lldb/test/Shell/Unwind/signal-in-leaf-function-aarch64.test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
# RUN: %clang_host %S/Inputs/signal-in-leaf-function-aarch64.c -o %t
55
# RUN: %lldb -s %s -o exit %t | FileCheck %s
66

7+
# Convert EXC_BAD_INSTRUCTION to SIGILL on darwin
8+
settings set platform.plugin.darwin.ignored-exceptions EXC_BAD_INSTRUCTION
9+
710
breakpoint set -n sigill_handler
811
# CHECK: Breakpoint 1: where = {{.*}}`sigill_handler
912

0 commit comments

Comments
 (0)