The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/config/README.DEBUG-kernel.txt

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 This directory contains a universal DEBUG kernel, built for 32-bit and
    2 64-bit Intel. It includes a dSYM bundle for remote kernel debugging
    3 and live kernel debugging.
    4 
    5 INSTALLATION
    6 
    7 !!!WARNING!!! These steps will overwrite the default kernel and
    8 System.kext. Backup all files before attempting these steps.
    9 
   10 To install the DEBUG kernel, do:
   11 bash-3.2$ sudo -s
   12 bash-3.2# cd /
   13 bash-3.2# ditto /AppleInternal/Developer/Extras/Kernel\ Debugging/System.kext /System/Library/Extensions/System.kext
   14 bash-3.2# cp -r /AppleInternal/Developer/Extras/Kernel\ Debugging/mach_kernel* /
   15 bash-3.2# chown -R root:wheel /System/Library/Extensions/System.kext /mach_kernel*
   16 bash-3.2# chmod -R g-w /System/Library/Extensions/System.kext /mach_kernel*
   17 bash-3.2# touch /System/Library/Extensions
   18 bash-3.2# shutdown -r now
   19 
   20 REMOTE KERNEL DEBUGGING
   21 
   22 See the documentation that accompanies the Kernel Debug Kit
   23 
   24 LIVE KERNEL DEBUGGING
   25 
   26 With the DEBUG kernel installed, set "kmem=1" in your "boot-args"
   27 NVRAM variable, reboot, and do:
   28 
   29 bash-3.2$ sudo gdb -a <arch> --quiet /mach_kernel
   30 (gdb) target darwin-kernel
   31 (gdb) source /AppleInternal/Developer/Extras/Kernel\ Debugging/kgmacros
   32 Loading Kernel GDB Macros package.  Type "help kgm" for more info.
   33 (gdb) attach
   34 Connected.
   35 
   36 <arch> should reflect the currently booted kernel architecture, either
   37 "i386" or "x86_64"
   38 
   39 

Cache object: 4fdc87314e857c1a28212e16ec3a566c


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.