Skip to content

Commit

Permalink
scripts/gdb: change kernel config dumping method
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Kuan-Ying Lee authored and masahir0y committed Jun 11, 2022
1 parent da4288b commit 1f7a6cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/gdb/linux/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ def invoke(self, arg, from_tty):
filename = arg

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

Expand Down

0 comments on commit 1f7a6cf

Please sign in to comment.