linux/scripts/gdb/linux
Florian Rommel ec0b6d17a5 scripts/gdb: fix failing KGDB detection during probe
Patch series "scripts/gdb: Fixes for $lx_current and $lx_per_cpu".

This series fixes several bugs in the GDB scripts related to the
$lx_current and $lx_per_cpu functions.  The changes were tested with GDB
10, 11, 12, 13, and 14.

Patch 1 fixes false-negative results when probing for KGDB

Patch 2 fixes the $lx_per_cpu function, which is currently non-functional
in QEMU-GDB and KGDB.

Patch 3 fixes an additional bug in $lx_per_cpu that occurs with KGDB.

Patch 4 fixes the incorrect detection of the current CPU number in KGDB,
which silently breaks $lx_per_cpu and $lx_current.


This patch (of 4):

The KGDB probe function sometimes failed to detect KGDB for SMP machines
as it assumed that task 2 (kthreadd) is running on CPU 0, which is not
necessarily the case.  Now, the detection is agnostic to kthreadd's CPU.

Link: https://lkml.kernel.org/r/20240425153501.749966-1-mail@florommel.de
Link: https://lkml.kernel.org/r/20240425153501.749966-2-mail@florommel.de
Signed-off-by: Florian Rommel <mail@florommel.de>
Cc: Andrew Jones <ajones@ventanamicro.com>
Cc: Deepak Gupta <debug@rivosinc.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Kieran Bingham <kbingham@kernel.org>
Cc: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Cc: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-05-08 08:41:27 -07:00
..
.gitignore
__init__.py
clk.py scripts/gdb: bail early if there are no clocks 2023-04-08 13:45:38 -07:00
config.py scripts/gdb: change kernel config dumping method 2022-06-11 18:31:53 +09:00
constants.py.in S390: 2024-03-15 13:03:13 -07:00
cpus.py scripts/gdb: add lx_current support for riscv 2023-11-01 12:46:59 -07:00
device.py scripts/gdb: fix lx-device-list-bus and lx-device-list-class 2023-12-06 16:12:49 -08:00
dmesg.py scripts/gdb: fix 'lx-dmesg' on 32 bits arch 2022-07-21 15:32:52 +02:00
genpd.py scripts/gdb: bail early if there are no generic PD 2023-04-08 13:45:38 -07:00
interrupts.py x86: replace CONFIG_HAVE_KVM with IS_ENABLED(CONFIG_KVM) 2024-02-08 08:45:35 -05:00
lists.py
Makefile
mm.py arch: simplify architecture specific page size configuration 2024-03-06 19:29:03 +01:00
modules.py scripts/gdb/modules: add get module text support 2023-08-21 13:46:22 -07:00
page_owner.py scripts/gdb: remove exception handling and refine print format 2023-12-10 17:21:49 -08:00
pgtable.py scripts/gdb/aarch64: add aarch64 page operation helper commands and configs 2023-08-21 13:46:22 -07:00
proc.py scripts/gdb: create linux/vfs.py for VFS related GDB helpers 2023-04-18 16:39:34 -07:00
radixtree.py scripts/gdb: add a Radix Tree Parser 2023-04-18 16:39:33 -07:00
rbtree.py
slab.py scripts/gdb: remove exception handling and refine print format 2023-12-10 17:21:49 -08:00
stackdepot.py scripts/gdb/stackdepot: rename pool_index to pools_num 2023-12-10 17:21:48 -08:00
symbols.py scripts/gdb/symbols: fix invalid escape sequence warning 2024-03-07 16:14:19 -08:00
tasks.py Kbuild updates for v6.8 2024-01-18 17:57:07 -08:00
timerlist.py scripts/gdb: timerlist: convert int chunks to str 2023-04-18 16:39:34 -07:00
utils.py scripts/gdb: fix failing KGDB detection during probe 2024-05-08 08:41:27 -07:00
vfs.py scripts/gdb: add GDB convenience functions $lx_dentry_name() and $lx_i_dentry() 2023-04-18 16:39:35 -07:00
vmalloc.py scripts/gdb/vmalloc: fix vmallocinfo error 2024-02-21 16:00:02 -08:00