1*d8b80295SApple OSS Distributionsexport MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd 2*d8b80295SApple OSS Distributionsexport MakeInc_def=${SRCROOT}/makedefs/MakeInc.def 3*d8b80295SApple OSS Distributionsexport MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule 4*d8b80295SApple OSS Distributionsexport MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir 5*d8b80295SApple OSS Distributions 6*d8b80295SApple OSS Distributionsinclude $(MakeInc_cmd) 7*d8b80295SApple OSS Distributionsinclude $(MakeInc_def) 8*d8b80295SApple OSS Distributions 9*d8b80295SApple OSS Distributions.PHONY: lldbmacros_install 10*d8b80295SApple OSS Distributions 11*d8b80295SApple OSS Distributionsdo_config_all:: lldbmacros_install 12*d8b80295SApple OSS Distributions 13*d8b80295SApple OSS DistributionsLLDBMACROS_SOURCE:=$(SRCROOT)/tools/lldbmacros/ 14*d8b80295SApple OSS DistributionsLLDBMACROS_BOOTSTRAP_DEST:=$(OBJPATH)/$(KERNEL_FILE_NAME).dSYM/$(DSYMLLDBMACROSDIR) 15*d8b80295SApple OSS DistributionsLLDBMACROS_DEST:=$(LLDBMACROS_BOOTSTRAP_DEST)/lldbmacros/ 16*d8b80295SApple OSS DistributionsLLDBMACROS_USERDEBUG_FILES= 17*d8b80295SApple OSS Distributionsifeq ($(BUILD_STATIC_LINK),1) 18*d8b80295SApple OSS Distributionsifneq ($(BUILD_XNU_LIBRARY),1) 19*d8b80295SApple OSS DistributionsKERNEL_STATIC_DSYM_LLDBMACROS := $(OBJPATH)/$(KERNEL_FILE_NAME).link/$(KERNEL_FILE_NAME).dSYM/$(DSYMLLDBMACROSDIR)/lldbmacros/ 20*d8b80295SApple OSS Distributionsendif 21*d8b80295SApple OSS Distributionsendif 22*d8b80295SApple OSS Distributions 23*d8b80295SApple OSS DistributionsLLDBMACROS_USERDEBUG_FILES:= \ 24*d8b80295SApple OSS Distributions usertaskdebugging/__init__.py \ 25*d8b80295SApple OSS Distributions usertaskdebugging/gdbserver.py \ 26*d8b80295SApple OSS Distributions usertaskdebugging/interface.py \ 27*d8b80295SApple OSS Distributions usertaskdebugging/rsprotocol.py \ 28*d8b80295SApple OSS Distributions usertaskdebugging/target.py \ 29*d8b80295SApple OSS Distributions usertaskdebugging/userprocess.py 30*d8b80295SApple OSS Distributions 31*d8b80295SApple OSS DistributionsLLDBMACROS_PYTHON_FILES = $(LLDBMACROS_USERDEBUG_FILES) \ 32*d8b80295SApple OSS Distributions core/__init__.py \ 33*d8b80295SApple OSS Distributions core/caching.py \ 34*d8b80295SApple OSS Distributions core/collections.py \ 35*d8b80295SApple OSS Distributions core/configuration.py \ 36*d8b80295SApple OSS Distributions core/cvalue.py \ 37*d8b80295SApple OSS Distributions core/io.py \ 38*d8b80295SApple OSS Distributions core/kernelcore.py \ 39*d8b80295SApple OSS Distributions core/lazytarget.py \ 40*d8b80295SApple OSS Distributions core/lldbwrap.py \ 41*d8b80295SApple OSS Distributions core/operating_system.py \ 42*d8b80295SApple OSS Distributions core/pointer.py \ 43*d8b80295SApple OSS Distributions core/standard.py \ 44*d8b80295SApple OSS Distributions core/xnu_lldb_init.py \ 45*d8b80295SApple OSS Distributions kmemory/__init__.py \ 46*d8b80295SApple OSS Distributions kmemory/btlog.py \ 47*d8b80295SApple OSS Distributions kmemory/kmem.py \ 48*d8b80295SApple OSS Distributions kmemory/vm.py \ 49*d8b80295SApple OSS Distributions kmemory/whatis.py \ 50*d8b80295SApple OSS Distributions kmemory/zone.py \ 51*d8b80295SApple OSS Distributions plugins/__init__.py \ 52*d8b80295SApple OSS Distributions plugins/zprint_perf_log.py \ 53*d8b80295SApple OSS Distributions sysregdoc/AArch64-esr_el1.xml \ 54*d8b80295SApple OSS Distributions bank.py \ 55*d8b80295SApple OSS Distributions turnstile.py \ 56*d8b80295SApple OSS Distributions kevent.py \ 57*d8b80295SApple OSS Distributions workqueue.py \ 58*d8b80295SApple OSS Distributions ulock.py \ 59*d8b80295SApple OSS Distributions xnu.py \ 60*d8b80295SApple OSS Distributions xnudefines.py \ 61*d8b80295SApple OSS Distributions ktrace.py \ 62*d8b80295SApple OSS Distributions macho.py \ 63*d8b80295SApple OSS Distributions mbufdefines.py \ 64*d8b80295SApple OSS Distributions netdefines.py \ 65*d8b80295SApple OSS Distributions ntstat.py \ 66*d8b80295SApple OSS Distributions routedefines.py \ 67*d8b80295SApple OSS Distributions ipc.py \ 68*d8b80295SApple OSS Distributions ipcimportancedetail.py \ 69*d8b80295SApple OSS Distributions kcdata.py \ 70*d8b80295SApple OSS Distributions scheduler.py \ 71*d8b80295SApple OSS Distributions structanalyze.py \ 72*d8b80295SApple OSS Distributions pmap.py \ 73*d8b80295SApple OSS Distributions memory.py \ 74*d8b80295SApple OSS Distributions mbufs.py \ 75*d8b80295SApple OSS Distributions net.py \ 76*d8b80295SApple OSS Distributions skywalk.py \ 77*d8b80295SApple OSS Distributions ioreg.py \ 78*d8b80295SApple OSS Distributions utils.py \ 79*d8b80295SApple OSS Distributions kdp.py \ 80*d8b80295SApple OSS Distributions process.py \ 81*d8b80295SApple OSS Distributions userspace.py \ 82*d8b80295SApple OSS Distributions pci.py \ 83*d8b80295SApple OSS Distributions misc.py \ 84*d8b80295SApple OSS Distributions apic.py \ 85*d8b80295SApple OSS Distributions kasan.py \ 86*d8b80295SApple OSS Distributions kauth.py \ 87*d8b80295SApple OSS Distributions usertaskgdbserver.py \ 88*d8b80295SApple OSS Distributions waitq.py \ 89*d8b80295SApple OSS Distributions xnutriage.py \ 90*d8b80295SApple OSS Distributions kmtriage.py \ 91*d8b80295SApple OSS Distributions zonetriage.py \ 92*d8b80295SApple OSS Distributions recount.py \ 93*d8b80295SApple OSS Distributions sysreg.py \ 94*d8b80295SApple OSS Distributions counter.py \ 95*d8b80295SApple OSS Distributions refgrp.py \ 96*d8b80295SApple OSS Distributions workload.py \ 97*d8b80295SApple OSS Distributions log.py \ 98*d8b80295SApple OSS Distributions kext.py \ 99*d8b80295SApple OSS Distributions nvram.py \ 100*d8b80295SApple OSS Distributions taskinfo.py \ 101*d8b80295SApple OSS Distributions exclaves.py 102*d8b80295SApple OSS Distributions 103*d8b80295SApple OSS Distributionsifneq ($(PLATFORM),MacOSX) 104*d8b80295SApple OSS Distributions LLDBMACROS_PYTHON_FILES+= \ 105*d8b80295SApple OSS Distributions plugins/iosspeedtracer.py \ 106*d8b80295SApple OSS Distributions plugins/iosspeedtracer.sh 107*d8b80295SApple OSS Distributionsendif 108*d8b80295SApple OSS Distributions 109*d8b80295SApple OSS Distributions 110*d8b80295SApple OSS Distributionsinclude $(MakeInc_rule) 111*d8b80295SApple OSS Distributionsinclude $(MakeInc_dir) 112*d8b80295SApple OSS Distributions 113*d8b80295SApple OSS Distributions# Strip macros during install (default) 114*d8b80295SApple OSS Distributionsifeq ($(SKIP_LLDBMACROS_UNIFDEF),1) 115*d8b80295SApple OSS Distributions LLDBMACROS_UNIFDEF := 116*d8b80295SApple OSS Distributionselse 117*d8b80295SApple OSS Distributions LLDBMACROS_UNIFDEF := $(DATA_UNIFDEF) 118*d8b80295SApple OSS Distributionsendif 119*d8b80295SApple OSS Distributions 120*d8b80295SApple OSS DistributionsINSTALL_LLDBMACROS_PYTHON_FILES=$(addprefix $(LLDBMACROS_DEST), $(LLDBMACROS_PYTHON_FILES)) 121*d8b80295SApple OSS Distributions$(eval $(call INSTALLPYTHON_RULE_template,$(INSTALL_LLDBMACROS_PYTHON_FILES),$(LLDBMACROS_SOURCE)%,pydir,$(LLDBMACROS_UNIFDEF),$(LLDBMACROS_DEST))) 122*d8b80295SApple OSS Distributions$(eval $(call INSTALLPYTHON_RULE_template,$(LLDBMACROS_BOOTSTRAP_DEST)/$(KERNEL_LLDBBOOTSTRAP_NAME),$(LLDBMACROS_SOURCE)/core/xnu_lldb_init.py,kbpydir,$(LLDBMACROS_UNIFDEF),$(LLDBMACROS_BOOTSTRAP_DEST)/)) 123*d8b80295SApple OSS Distributions 124*d8b80295SApple OSS Distributionsifeq ($(BUILD_STATIC_LINK),1) 125*d8b80295SApple OSS Distributionsifneq ($(BUILD_XNU_LIBRARY),1) 126*d8b80295SApple OSS DistributionsINSTALL_STATIC_DSYM_LLDBMACROS_PYTHON_FILES=$(addprefix $(KERNEL_STATIC_DSYM_LLDBMACROS), $(LLDBMACROS_PYTHON_FILES)) 127*d8b80295SApple OSS Distributions$(eval $(call INSTALLPYTHON_RULE_template,$(INSTALL_STATIC_DSYM_LLDBMACROS_PYTHON_FILES),$(LLDBMACROS_SOURCE)%,sdpydir,$(LLDBMACROS_UNIFDEF),$(KERNEL_STATIC_DSYM_LLDBMACROS))) 128*d8b80295SApple OSS Distributions$(eval $(call INSTALLPYTHON_RULE_template,$(KERNEL_STATIC_DSYM_LLDBMACROS)/../$(KERNEL_LLDBBOOTSTRAP_NAME),$(LLDBMACROS_SOURCE)/core/xnu_lldb_init.py,kbsdpydir,$(LLDBMACROS_UNIFDEF),$(KERNEL_STATIC_DSYM_LLDBMACROS)/../)) 129*d8b80295SApple OSS Distributionsendif 130*d8b80295SApple OSS Distributionsendif 131*d8b80295SApple OSS Distributions 132*d8b80295SApple OSS Distributionsifeq ($(BUILD_STATIC_LINK),1) 133*d8b80295SApple OSS Distributionsifneq ($(BUILD_XNU_LIBRARY),1) 134*d8b80295SApple OSS DistributionsSTATIC_DSYM_LLDBMACROS_INSTALL_TARGETS := \ 135*d8b80295SApple OSS Distributions $(INSTALL_STATIC_DSYM_LLDBMACROS_PYTHON_FILES) \ 136*d8b80295SApple OSS Distributions $(KERNEL_STATIC_DSYM_LLDBMACROS)/../$(KERNEL_LLDBBOOTSTRAP_NAME) 137*d8b80295SApple OSS Distributionsendif 138*d8b80295SApple OSS Distributionsendif 139*d8b80295SApple OSS Distributions 140*d8b80295SApple OSS Distributionslldbmacros_install: $(INSTALL_LLDBMACROS_PYTHON_FILES) $(LLDBMACROS_BOOTSTRAP_DEST)/$(KERNEL_LLDBBOOTSTRAP_NAME) $(STATIC_DSYM_LLDBMACROS_INSTALL_TARGETS) 141*d8b80295SApple OSS Distributions $(_v)$(MKDIR) $(LLDBMACROS_DEST)/builtinkexts 142*d8b80295SApple OSS Distributionsifeq ($(BUILD_STATIC_LINK),1) 143*d8b80295SApple OSS Distributionsifneq ($(BUILD_XNU_LIBRARY),1) 144*d8b80295SApple OSS Distributions $(_v)$(MKDIR) $(KERNEL_STATIC_DSYM_LLDBMACROS)/builtinkexts 145*d8b80295SApple OSS Distributionsendif 146*d8b80295SApple OSS Distributionsendif 147