Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c04a2ae authored by Kuan-Ying Lee's avatar Kuan-Ying Lee Committed by Greg Kroah-Hartman
Browse files

scripts/gdb: change kernel config dumping method



[ Upstream commit 1f7a6cf6b07c74a17343c2559cd5f5018a245961 ]

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: 13610aa9 ("kernel/configs: use .incbin directive to embed config_data.gz")
Signed-off-by: default avatarKuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 1a36f77d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -24,9 +24,9 @@ class LxConfigDump(gdb.Command):
            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?")