From f197d75fcad125f41cc6e2fdf1b3ea733db995f1 Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Mon, 23 May 2016 16:24:40 -0700 Subject: scripts/gdb: provide linux constants Some macro's and defines are needed when parsing memory, and without compiling the kernel as -g3 they are not available in the debug-symbols. We use the pre-processor here to extract constants to a dedicated module for the linux debugger extensions Top level Kbuild is used to call in and generate the constants file, while maintaining dependencies on autogenerated files in include/generated Link: http://lkml.kernel.org/r/bc3df9c25f57ea72177c066a51a446fc19e2c27f.1462865983.git.jan.kiszka@siemens.com Signed-off-by: Kieran Bingham Signed-off-by: Jan Kiszka Cc: Michal Marek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Kbuild | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Kbuild') diff --git a/Kbuild b/Kbuild index f55cefd..3d0ae15 100644 --- a/Kbuild +++ b/Kbuild @@ -5,6 +5,7 @@ # 2) Generate timeconst.h # 3) Generate asm-offsets.h (may need bounds.h and timeconst.h) # 4) Check for missing system calls +# 5) Generate constants.py (may need bounds.h) # Default sed regexp - multiline due to syntax constraints define sed-y @@ -96,5 +97,14 @@ quiet_cmd_syscalls = CALL $< missing-syscalls: scripts/checksyscalls.sh $(offsets-file) FORCE $(call cmd,syscalls) +##### +# 5) Generate constants for Python GDB integration +# + +extra-$(CONFIG_GDB_SCRIPTS) += build_constants_py + +build_constants_py: $(obj)/$(timeconst-file) $(obj)/$(bounds-file) + @$(MAKE) $(build)=scripts/gdb/linux $@ + # Keep these three files during make clean no-clean-files := $(bounds-file) $(offsets-file) $(timeconst-file) -- cgit v1.1