Skip to content

Commit 1f7a6cf

Browse files
Kuan-Ying Leemasahir0y
authored andcommitted
scripts/gdb: change kernel config dumping method
MAGIC_START("IKCFG_ST") and MAGIC_END("IKCFG_ED") are moved out from the kernel_config_data variable. Thus, we parse kernel_config_data directly instead of considering offset of MAGIC_START and MAGIC_END. Fixes: 13610aa ("kernel/configs: use .incbin directive to embed config_data.gz") Signed-off-by: Kuan-Ying Lee <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent da4288b commit 1f7a6cf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/gdb/linux/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ def invoke(self, arg, from_tty):
2424
filename = arg
2525

2626
try:
27-
py_config_ptr = gdb.parse_and_eval("kernel_config_data + 8")
28-
py_config_size = gdb.parse_and_eval(
29-
"sizeof(kernel_config_data) - 1 - 8 * 2")
27+
py_config_ptr = gdb.parse_and_eval("&kernel_config_data")
28+
py_config_ptr_end = gdb.parse_and_eval("&kernel_config_data_end")
29+
py_config_size = py_config_ptr_end - py_config_ptr
3030
except gdb.error as e:
3131
raise gdb.GdbError("Can't find config, enable CONFIG_IKCONFIG?")
3232

0 commit comments

Comments
 (0)