Kext driver cannot find symbol OSPrintBacktrace

213 views Asked by At

I'm using the following function when one of my iokit commands is being called. it defined in

extern void OSPrintBacktrace(void);

however, my kext seems that my kext fail to load since it couldn't find this symbol..

 12/26/16 10:02:53.000 AM kernel[0]: kxld[com.my.driver]: The following symbols are unresolved for this kext:
 12/26/16 10:02:53.000 AM kernel[0]: kxld[com.my.driver]: _OSPrintBacktrace

although it does exists in kernel binary

 nm /System/Library/Kernels/kernel  | grep OSPrintBacktrace
 ffffff8000837290 T _OSPrintBacktrace

Can anybody tell me what am i missing here ?

1

There are 1 answers

0
pmdj On BEST ANSWER

The function OSPrintBacktrace is not part of any of the (public) KPIs. OSReportWithBacktrace is however (libkern), so you're probably best off using that. Alternatively, you can also use OSBacktrace.