linux-stable/scripts/gdb/linux
Florian Fainelli d1c4dedcd2 scripts/gdb: raise error with reduced debugging information
[ Upstream commit 8af055ae25 ]

If CONFIG_DEBUG_INFO_REDUCED is enabled in the kernel configuration, we
will typically not be able to load vmlinux-gdb.py and will fail with:

Traceback (most recent call last):
  File "/home/fainelli/work/buildroot/output/arm64/build/linux-custom/vmlinux-gdb.py", line 25, in <module>
    import linux.utils
  File "/home/fainelli/work/buildroot/output/arm64/build/linux-custom/scripts/gdb/linux/utils.py", line 131, in <module>
    atomic_long_counter_offset = atomic_long_type.get_type()['counter'].bitpos
KeyError: 'counter'

Rather be left wondering what is happening only to find out that reduced
debug information is the cause, raise an eror.  This was not typically a
problem until e3c8d33e0d ("scripts/gdb: fix 'lx-dmesg' on 32 bits arch")
but it has since then.

Link: https://lkml.kernel.org/r/20230406215252.1580538-1-f.fainelli@gmail.com
Fixes: e3c8d33e0d ("scripts/gdb: fix 'lx-dmesg' on 32 bits arch")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Cc: Antonio Borneo <antonio.borneo@foss.st.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: John Ogness <john.ogness@linutronix.de>
Cc: Kieran Bingham <kbingham@kernel.org>
Cc: Petr Mladek <pmladek@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-11 23:00:33 +09:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
__init__.py
clk.py scripts/gdb: bail early if there are no clocks 2023-05-11 23:00:33 +09:00
config.py scripts/gdb: change kernel config dumping method 2022-06-14 18:36:24 +02:00
constants.py.in scripts/gdb: raise error with reduced debugging information 2023-05-11 23:00:33 +09:00
cpus.py scripts/gdb: add lx_current support for arm64 2021-05-07 00:26:33 -07:00
device.py scripts/gdb: add helpers to find and list devices 2019-07-16 19:23:24 -07:00
dmesg.py scripts/gdb: fix 'lx-dmesg' on 32 bits arch 2022-08-17 14:23:56 +02:00
genpd.py scripts/gdb: bail early if there are no generic PD 2023-05-11 23:00:33 +09:00
lists.py scripts/gdb: fix list_for_each 2021-02-26 09:41:05 -08:00
Makefile kbuild: use always-y instead of extra-y 2021-02-16 12:01:45 +09:00
modules.py
proc.py scripts/gdb/proc: add struct mount & struct super_block addr in lx-mounts command 2020-10-16 11:11:22 -07:00
rbtree.py scripts/gdb: fix python 3.8 SyntaxWarning 2020-08-12 10:58:02 -07:00
symbols.py gdb: lx-symbols: store the abspath() 2021-05-07 00:26:32 -07:00
tasks.py scripts/gdb/tasks: add headers and improve spacing format 2020-10-16 11:11:22 -07:00
timerlist.py scripts/gdb: add a timer list command 2019-05-14 19:52:52 -07:00
utils.py scripts/gdb: fix 'lx-dmesg' on 32 bits arch 2022-08-17 14:23:56 +02:00