mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-03 09:48:29 +00:00
Show crash reports on SIGSYS
This will help make it easier to troubleshoot ABI breakages with on operating systems that, unlike Linux don't have ironclad guarantees to not break userspace.
This commit is contained in:
parent
a4601a24d3
commit
44da16255a
11 changed files with 83 additions and 19 deletions
|
@ -164,8 +164,17 @@ systemfive_bsdscrub:
|
|||
systemfive_bsd:
|
||||
cmp $0xfff,%ax
|
||||
je systemfive_enosys
|
||||
mov %rcx,%r10 # note: we do not create a stack frame
|
||||
mov %rcx,%r10
|
||||
push %rbx
|
||||
push 32(%rsp)
|
||||
push 24(%rsp)
|
||||
push 16(%rsp)
|
||||
mov %rax,%rbx # save ordinal for SIGSYS crash report
|
||||
syscall # bsd will need arg on stack sometimes
|
||||
pop %rbx
|
||||
pop %rbx
|
||||
pop %rbx
|
||||
pop %rbx
|
||||
jc systemfive_errno # bsd sets carry flag if %rax is errno
|
||||
ret
|
||||
.endfn systemfive_bsd
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue