jasonmolenda wrote:

> I have fixed/worked around the mach exception issue in a [followup 
> commit](https://github.com/llvm/llvm-project/commit/b903badd73a2467fdd4e363231f2bf9b0704b546)
>  with a `settings set platform.plugin.darwin.ignored-exceptions 
> EXC_BAD_INSTRUCTION`. Now the process gets a SIGILL as expected, but it still 
> fails at the backtrace step (the second one, after stopping inside the 
> handler).

Oh, that's a clever idea, I forgot about that setting.

If you add `process handle -p true -s false SIGILL` (lldb was stopping on the 
SIGILL signal before sigtramp / the registered handler ran), then 
sigill_handler is called,

```
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
  * frame #0: 0x0000000100003f4c a.out`sigill_handler(signo=4) + 20 at 
signal-in-leaf-function-aarch64.c:10
    frame #1: 0x0000000197f93584 libsystem_platform.dylib`_sigtramp + 56
    frame #2: 0x0000000100003f7c a.out`main + 44 at 
signal-in-leaf-function-aarch64.c:14
    frame #3: 0x0000000197bda0e0 dyld`start + 2360
```

https://github.com/llvm/llvm-project/pull/91321
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to