How do you create DTrace on Mac OS X?

I am trying to create a dtrace target in an Xcode project using the tip here:

http://osx86.boeaja.info/2009/10/building-xnu-kernel-on-snow-leopard/

But I understand: libproc.m: 24: 49: error: CoreSymbolication / CoreSymbolication.h: No such file or directory

I understand that CoreSymbolication is a private structure, but Apple must make this header available somewhere so that I can build dtrace, right? Can someone point me to the necessary files for building dtrace?

+3
source share
1 answer

, , , Apple , , , . CoreSymbolication/CoreSymbolication.h Obj-C, , , DTrace . ( .)

, userland dtrace(1m). , ...:-D

# dtrace -n 'pid$target:CoreSymbolication::entry {}' -c 'dtrace -ln syscall::write:entry'
dtrace: description 'pid$target:CoreSymbolication::entry ' matched 246 probes
   ID   PROVIDER            MODULE                          FUNCTION NAME
  147    syscall                                               write entry
dtrace: pid 88089 has exited
CPU     ID                    FUNCTION:NAME
  2   6538 CSSymbolOwnerGetRegionWithName:entry 
  2   5014 CSSymbolOwnerForeachRegionWithName:entry 
  2   5078      CSRegionForeachSymbol:entry 
  2   6495 CSSymbolicatorGetSymbolOwnerWithUUIDAtTime:entry 
  2   6493 CSSymbolicatorForeachSymbolOwnerWithUUIDAtTime:entry 
  2   6494 CSSymbolicatorForeachSymbolOwnerWithCFUUIDBytesAtTime:entry 
  2   5048  CSSymbolOwnerGetDataFlags:entry 
  2   6538 CSSymbolOwnerGetRegionWithName:entry 
  2   5014 CSSymbolOwnerForeachRegionWithName:entry 
  2   5078      CSRegionForeachSymbol:entry 
  2   5092         CSSymbolIsExternal:entry 
  2   5092         CSSymbolIsExternal:entry
  ...

, dtrace.

0

Source: https://habr.com/ru/post/1731072/


All Articles