2 * gdb helper commands and functions for Linux kernel debugging
4 * Kernel constants derived from include files.
6 * Copyright (c) 2016 Linaro Ltd
11 * This work is licensed under the terms of the GNU GPL version 2.
15 #include <linux/clk-provider.h>
17 #include <linux/hrtimer.h>
18 #include <linux/mount.h>
19 #include <linux/of_fdt.h>
20 #include <linux/threads.h>
22 /* We need to stringify expanded macros so that they can be parsed */
25 #define XSTRING(x) STRING(x)
27 #define LX_VALUE(x) LX_##x = x
28 #define LX_GDBPARSED(x) LX_##x = gdb.parse_and_eval(XSTRING(x))
31 * IS_ENABLED generates (a || b) which is not compatible with python
32 * We can only switch on configuration items we know are available
33 * Therefore - IS_BUILTIN() is more appropriate
35 #define LX_CONFIG(x) LX_##x = IS_BUILTIN(x)
37 /* The build system will take care of deleting everything above this marker */
38 <!-- end-c-headers -->
42 /* linux/clk-provider.h */
43 if IS_BUILTIN(CONFIG_COMMON_CLK):
44 LX_GDBPARSED(CLK_GET_RATE_NOCACHE)
48 LX_VALUE(SB_SYNCHRONOUS)
52 LX_VALUE(SB_NODIRATIME)
55 LX_GDBPARSED(hrtimer_resolution)
62 LX_VALUE(MNT_NODIRATIME)
63 LX_VALUE(MNT_RELATIME)
69 LX_VALUE(OF_DT_HEADER)
72 LX_CONFIG(CONFIG_GENERIC_CLOCKEVENTS)
73 LX_CONFIG(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST)
74 LX_CONFIG(CONFIG_HIGH_RES_TIMERS)
75 LX_CONFIG(CONFIG_NR_CPUS)
77 LX_CONFIG(CONFIG_TICK_ONESHOT)