title: Backtrace for osx core dump using lldb
body: <p>My kernel extension crash a several times so I want to get the correct backtrace (with function names) from the crash</p>
  
  <p>Accroding to the article <a href="https://developer.apple.com/library/mac/technotes/tn2004/tn2118.html" rel="nofollow">https://developer.apple.com/library/mac/technotes/tn2004/tn2118.html</a>
  I wanted to use gdb for this, but it seems that GDB does not understand the dump</p>
  
  <pre><code>dhcp80-241:KernelDebugKit gburanov$ sudo gdb -c /PanicDumps/core-xnu-2050.48.12-10.41.20.195-39882f44
  GNU gdb 6.3.50-20050815 (Apple version gdb-1824) (Wed Feb  6 22:51:23 UTC 2013)
  Copyright 2004 Free Software Foundation, Inc.
  GDB is free software, covered by the GNU General Public License, and you are
  welcome to change it and/or distribute copies of it under certain conditions.
  Type "show copying" to see the conditions.
  There is absolutely no warranty for GDB.  Type "show warranty" for details.
  This GDB was configured as "x86_64-apple-darwin".
  Core file contained no thread-specific data
  (gdb)
  </code></pre>
  
  <p>I heard that it is not possible by gdb, but lldb does not work as well</p>
  
  <pre><code>dhcp80-241:KernelDebugKit gburanov$ lldb
  (lldb) target create -d -c /PanicDumps/core-xnu-2050.48.12-10.41.18.191-2c2bf92f /Volumes/KernelDebugKit/mach_kernel
  Loading kernel debugging from /Volumes/KernelDebugKit/mach_kernel.dSYM/Contents/Resources/Python/mach_kernel.py
  LLDB version LLDB-179.5
  settings set target.process.python-os-plugin-path "/Volumes/KernelDebugKit/mach_kernel.dSYM/Contents/Resources/Python/lldbmacros/core/operating_system.py"
  command script import "/Volumes/KernelDebugKit/mach_kernel.dSYM/Contents/Resources/Python/lldbmacros/xnu.py"
  xnu debug macros loaded successfully. Run showlldbtypesummaries to enable type summaries.
  error: Unable to find process plug-in for core file '/PanicDumps/core-xnu-2050.48.12-10.41.18.191-2c2bf92f'
  (lldb)
  </code></pre>
  
  <p>What is the correct way to work with core dumps?</p>