History

scripts/gdb: fix invocation when CONFIG_COMMON_CLK is not set

CLK_GET_RATE_NOCACHE depends on CONFIG_COMMON_CLK. Importing constants.py when CONFIG_COMMON_CLK is not defined causes: (gdb) lx-symbols (...) File "scripts/gdb/linux/proc.py", line 15, in <module> from linux import constants File "scripts/gdb/linux/constants.py", line 2, in <module> LX_CLK_GET_RATE_NOCACHE = gdb.parse_and_eval("CLK_GET_RATE_NOCACHE") gdb.error: No symbol "CLK_GET_RATE_NOCACHE" in current context.

Fabiano Rosas committed 7 years ago

Commit ef7a77c1 parent df172771 file · +2 −1Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/gdb/linux/constants.py.in+2−1
@@ -40,7 +40,8 @@ · 39 unmodified lines
40import gdb40import gdb
41 41
42/* linux/clk-provider.h */42/* linux/clk-provider.h */
43LX_GDBPARSED(CLK_GET_RATE_NOCACHE)43if IS_BUILTIN(CONFIG_COMMON_CLK):
44 LX_GDBPARSED(CLK_GET_RATE_NOCACHE)
44 45
45/* linux/fs.h */46/* linux/fs.h */
46LX_VALUE(SB_RDONLY)47LX_VALUE(SB_RDONLY)