* http://man7.org/linux/man-pages/man5/core.5.html * Able to dump the header and the program headers * Checks /proc/[pid]/coredump_filter to know which maps should be dumped * Check for bit 6 to 0 (priv/share anon mappings, priv/share file-backed, elf hdr, priv/share huge pages) * Missing: priv/share DAX pages
42 lines
889 B
Makefile
42 lines
889 B
Makefile
include ../config.mk
|
|
|
|
NAME=r_debug
|
|
DEPS=r_reg r_anal r_bp r_util r_io r_parse r_cons r_db r_syscall r_hash
|
|
CFLAGS+=-DCORELIB
|
|
|
|
foo:
|
|
@${MAKE} libs
|
|
@${MAKE} plugins
|
|
|
|
include ../config.mk
|
|
include ${STATIC_DEBUG_PLUGINS}
|
|
|
|
# Enable pure-MACH debugging by default.
|
|
# The ptrace one will be deprecated at some point
|
|
XNU_USE_PTRACE?=0
|
|
CFLAGS+=-DXNU_USE_PTRACE=$(XNU_USE_PTRACE)
|
|
|
|
STATIC_OBJS=$(subst ..,p/..,$(subst debug_,p/debug_,$(STATIC_OBJ)))
|
|
|
|
OBJS=signal.o map.o trace.o arg.o debug.o plugin.o snap.o
|
|
OBJS+=pid.o reg.o desc.o esil.o ${STATIC_OBJS}
|
|
|
|
ifeq (${OSTYPE},darwin)
|
|
OBJS+= p/${NATIVE_OBJS}
|
|
endif
|
|
ifeq ($(OSTYPE),$(filter $(OSTYPE),gnulinux android))
|
|
CFLAGS+=-I../bin/format/elf
|
|
OBJS+= p/${NATIVE_OBJS}
|
|
OBJS+= p/${COREDUMP_OBJS}
|
|
endif
|
|
|
|
plugins:
|
|
cd p && ${MAKE} all
|
|
|
|
ios:
|
|
cd ../.. ; sys/rebuild.sh iosdbg
|
|
|
|
include ../rules.mk
|
|
|
|
libs: ${LIBSO} ${LIBAR}
|
|
.PHONY: foo plugins tests libs
|