WSL2-Linux-Kernel/Documentation
Barry Song dc9586823f scripts/gdb: document lx_current is only supported by x86
Patch series "scripts/gdb: clarify the platforms supporting lx_current and add arm64 support", v2.

lx_current depends on per_cpu current_task variable which exists on x86
only.  so it actually works on x86 only.  the 1st patch documents this
clearly; the 2nd patch adds support for arm64.

This patch (of 2):

x86 is the only architecture which has per_cpu current_task:

  arch$ git grep current_task | grep -i per_cpu
  x86/include/asm/current.h:DECLARE_PER_CPU(struct task_struct *, current_task);
  x86/kernel/cpu/common.c:DEFINE_PER_CPU(struct task_struct *, current_task) ____cacheline_aligned =
  x86/kernel/cpu/common.c:EXPORT_PER_CPU_SYMBOL(current_task);
  x86/kernel/cpu/common.c:DEFINE_PER_CPU(struct task_struct *, current_task) = &init_task;
  x86/kernel/cpu/common.c:EXPORT_PER_CPU_SYMBOL(current_task);
  x86/kernel/smpboot.c:	per_cpu(current_task, cpu) = idle;

On other architectures, lx_current() will lead to a python exception:

  (gdb) p $lx_current().pid
  Python Exception <class 'gdb.error'> No symbol "current_task" in current context.:
  Error occurred in Python: No symbol "current_task" in current context.

To avoid more people struggling and wasting time in other architectures,
document it.

Link: https://lkml.kernel.org/r/20210314203444.15188-1-song.bao.hua@hisilicon.com
Link: https://lkml.kernel.org/r/20210314203444.15188-2-song.bao.hua@hisilicon.com
Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Kieran Bingham <kbingham@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-05-07 00:26:33 -07:00
..
ABI mm: cma: support sysfs 2021-05-05 11:27:24 -07:00
PCI Documentation: PCI: Add PCI endpoint NTB function user guide 2021-02-23 14:15:45 -06:00
RCU docs: Correctly spell Stephen Hemminger's name 2021-03-15 13:53:24 -07:00
accounting
admin-guide mm,memory_hotplug: add kernel boot option to enable memmap_on_memory 2021-05-05 11:27:27 -07:00
arm It's been a relatively busy cycle in docsland, though more than usually 2021-04-26 13:22:43 -07:00
arm64 arm64 updates for 5.13: 2021-04-26 10:25:03 -07:00
block block/bfq: update comments and default value in docs for fifo_expire 2021-03-02 11:25:38 -07:00
bpf bpf: Document the pahole release info related to libbpf in bpf_devel_QA.rst 2021-04-23 17:11:58 -07:00
cdrom
core-api mm/mmzone.h: fix existing kernel-doc comments and link them to core-api 2021-04-30 11:20:43 -07:00
cpu-freq
crypto
dev-tools scripts/gdb: document lx_current is only supported by x86 2021-05-07 00:26:33 -07:00
devicetree Kbuild updates for v5.13 2021-04-29 14:24:39 -07:00
doc-guide
driver-api VFIO updates for v5.13-rc1 2021-04-28 17:19:47 -07:00
fault-injection
fb Documentation: Add leading slash to some paths 2021-03-31 13:49:19 -06:00
features Documentation/features: mark BATCHED_UNMAP_TLB_FLUSH doesn't apply to ARM64 2021-03-15 13:17:40 -06:00
filesystems for-5.13/drivers-2021-04-27 2021-04-28 14:39:37 -07:00
firmware-guide Merge branches 'acpi-pci' and 'acpi-processor' 2021-04-26 17:03:05 +02:00
firmware_class
fpga Documentation: fpga: dfl: Add description for DFL UIO support 2021-03-28 14:58:18 +02:00
gpu drm-misc-next for 5.13: 2021-04-07 17:32:12 +10:00
hid Documentation: Add leading slash to some paths 2021-03-31 13:49:19 -06:00
hwmon hwmon: Remove amd_energy driver 2021-04-20 06:52:08 -07:00
i2c
ia64
ide
iio iio: hrtimer: Allow sub Hz granularity 2021-03-25 19:13:49 +00:00
infiniband
input input: Documentation: corrections for uinput.rst 2021-03-08 17:15:37 -07:00
isdn
kbuild Kconfig updates for v5.13 2021-04-29 14:32:00 -07:00
kernel-hacking
leds Documentation: Add leading slash to some paths 2021-03-31 13:49:19 -06:00
litmus-tests
livepatch docs: livepatch: Fix a typo and remove the unnecessary gaps in a sentence 2021-03-08 17:25:16 -07:00
locking
m68k
maintainer media: add a subsystem profile documentation 2021-03-22 08:56:42 +01:00
mhi
mips
misc-devices dw-xdata-pcie: Update outdated info and improve text format 2021-04-14 19:47:28 +02:00
netlabel
networking Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2021-04-28 11:59:31 -07:00
nios2
nvdimm
openrisc
parisc
pcmcia
power power supply and reset changes for the v5.13 series 2021-04-28 15:43:58 -07:00
powerpc docs: powerpc: Fix misspellings and grammar errors 2021-03-31 13:50:59 -06:00
process It's been a relatively busy cycle in docsland, though more than usually 2021-04-26 13:22:43 -07:00
riscv
s390 s390/pci: expose UID uniqueness guarantee 2021-04-05 11:30:57 +02:00
scheduler sched/debug: Rename the sched_debug parameter to sched_verbose 2021-04-17 13:22:44 +02:00
scsi for-5.13/block-2021-04-27 2021-04-28 14:27:12 -07:00
security doc: trusted-encrypted: updates with TEE as a new trust source 2021-04-14 16:30:30 +03:00
sh
sound
sparc
sphinx docs: sphinx: Fix couple of spellings in the file rstFlatTable.py 2021-03-06 17:36:50 -07:00
sphinx-static
spi spi: Updates for v5.13 2021-04-26 16:32:11 -07:00
staging
target
timers
trace Char/Misc driver patches for 5.12-rc1 2021-02-24 10:25:37 -08:00
translations It's been a relatively busy cycle in docsland, though more than usually 2021-04-26 13:22:43 -07:00
usb docs: usbip: Fix major fields and descriptions in protocol 2021-04-09 16:04:45 +02:00
userspace-api Networking changes for 5.13. 2021-04-29 11:57:23 -07:00
virt It's been a relatively busy cycle in docsland, though more than usually 2021-04-26 13:22:43 -07:00
vm mm: gup: remove FOLL_SPLIT 2021-04-30 11:20:37 -07:00
w1
watchdog docs: watchdog: fix obsolete include file reference in pcwd 2021-03-06 17:36:51 -07:00
x86 x86/sgx: Introduce virtual EPC for use by KVM guests 2021-04-06 09:43:17 +02:00
xtensa
.gitignore
COPYING-logo
Changes
CodingStyle
Kconfig
Makefile
SubmittingPatches
arch.rst docs: Group arch-specific documentation under "CPU Architectures" 2021-03-15 13:35:35 -06:00
asm-annotations.rst
atomic_bitops.txt
atomic_t.txt
conf.py docs: conf.py: adjust the LaTeX document output 2021-03-08 17:20:03 -07:00
docutils.conf
dontdiff kbuild: generate Module.symvers only when vmlinux exists 2021-04-25 05:17:02 +09:00
index.rst docs: Group arch-specific documentation under "CPU Architectures" 2021-03-15 13:35:35 -06:00
logo.gif
memory-barriers.txt
watch_queue.rst