0% found this document useful (0 votes)
10 views1 page

Kernel Debugging Notes

The document provides information on how to symbolicate kernel panic traces by adding keepsyms=1 to the boot arguments. It also discusses debugging an AVX related crash that occurs at bootup in the corecrypto kernel extension, occurring due to lack of xsave support.

Uploaded by

kakashiwrs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views1 page

Kernel Debugging Notes

The document provides information on how to symbolicate kernel panic traces by adding keepsyms=1 to the boot arguments. It also discusses debugging an AVX related crash that occurs at bootup in the corecrypto kernel extension, occurring due to lack of xsave support.

Uploaded by

kakashiwrs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

1. How do I symbolicate kernel panic traces?

Just add keepsyms=1 to either the Kernel Flags setting in


/Library/Preferences/SystemConfiguration/com.apple.Boot.plist,
or to the boot-args NVRAM variable. Reboot, and any subsequent panics will be
automatically symbolicated. You can run
mangled C++ symbols through the c++filt command line utility to get the proper C++
function signatures.

$ sudo nvram boot-args="-v keepsyms=1"

Thanks for Phil Dennis-Jordan for this great tip.

2. Debugging a AVX related crash which occurs at bootup.

$ nm /System/Library/Extensions/corecrypto.kext/Contents/MacOS/corecrypto | grep
avx
0000000000001840 T _ccsha256_vng_intel_avx1_compress
0000000000036708 T _ccsha256_vng_intel_avx2_compress
0000000000026973 T _ccsha512_vng_intel_avx1_compress
00000000000327cb T _ccsha512_vng_intel_avx2_compress
000000000001d960 T _gcmDecrypt_avx1
000000000001c980 T _gcmEncrypt_avx1

$ gdb /System/Library/Extensions/corecrypto.kext/Contents/MacOS/corecrypto
(gdb) x/16i 0x0000000000001840
0x1840: push %rbp
0x1841: mov %rsp,%rbp
0x1844: push %rbx
0x1845: push %r12
0x1847: push %r13
0x1849: push %r14
0x184b: push %r15
0x184d: sub $0x168,%rsp
0x1854: lea 0x60(%rsp),%rax
0x1859: and $0xffffffffffffffe0,%rax
0x185d: vmovdqa %ymm0,(%rax) <--- the crash occurs here due to lack of "xsave"
support

You might also like