[RFC PATCH 0/6] Support for Linux kernel thread aware debug
Omair Javaid
omair.javaid@linaro.org
Tue Jan 29 05:03:00 GMT 2019
This patch series implements linux kernel target which allows linux kernel
tasks to be viewed as GDB threads. We have had multiple set of patches
submitted over last few years aiming to insert add-ons into GDB for debugging
Linux kernel. This patch series builds on top of Linux kernel infrastructure
submitted by Philipp Rudo in his various sets of patches aiming to debug
Linux kernel dumps.
Here is a list of patch series submitted by Philipp Rudo:
RFC v5 https://sourceware.org/ml/gdb-patches/2018-03/msg00243.html
RFC v4 https://sourceware.org/ml/gdb-patches/2017-06/msg00347.html
RFC v3 https://sourceware.org/ml/gdb-patches/2017-03/msg00268.html
Changes in this patch series:
- Rebase over current GDB
- Separate out core-dump support for future
- Rework implementation of linux_kernel_ops class for live task management
- Implements target class for linux kernel
- Add support for AArch64 and Arm targets to debug linux kernel with
thread awareness.
Limitation:
- No support for module debugging
- Only support direct mapped kernel addresses.
There has been a lot of discussion over mailing list about how to improve
debugability of Linux kernel using gdb. These discussion threads eventually
ended up with Phillip writing above patch series which unfortunately stalled
permanently due to various types of delays.
I have listed below some of the past mailing list threads for reference.
Andreas Arnez
https://gcc.gnu.org/wiki/cauldron2015?action=AttachFile&do=get&target=Andreas+Arnez_+Debugging+Linux+kernel+dumps+with+GDB.pdf
Peter Griffin: RFC GDB Linux Awareness analysis
https://sourceware.org/ml/gdb-patches/2015-06/msg00040.html
Ales Novak: gdb on Linux Kernel dumps (gdb-kdump)
https://sourceware.org/ml/gdb/2015-09/msg00014.html
Kieran Bingham: GDB Linux Awareness revisited
https://www.sourceware.org/ml/gdb/2016-01/msg00028.html
Omair Javaid (3):
Linux kernel thread awareness Arm target support
Linux kernel thread awareness AArch64 target support
Linux kernel debug infrastructure and target Linux kernel
Philipp Rudo (4):
Convert substitute_path_component to C++
Add libiberty/concat styled concat_path function
Add scoped_restore_regcache_ptid
Linux kernel debug infrastructure and target Linux kernel
gdb/Makefile.in | 7 +
gdb/aarch64-lk-tdep.c | 135 +++++
gdb/arm-lk-tdep.c | 139 +++++
gdb/auto-load.c | 19 +-
gdb/common/common-utils.h | 11 +
gdb/configure.tgt | 9 +-
gdb/defs.h | 1 +
gdb/gdbarch.c | 34 +-
gdb/gdbarch.h | 11 +-
gdb/gdbarch.sh | 4 +
gdb/lk-bitmap.h | 226 ++++++++
gdb/lk-list.h | 200 +++++++
gdb/lk-low.c | 1126 +++++++++++++++++++++++++++++++++++++++
gdb/lk-low.h | 354 ++++++++++++
gdb/osabi.c | 1 +
gdb/regcache.h | 21 +
gdb/unittests/utils-selftests.c | 10 +-
gdb/utils.c | 85 +--
gdb/utils.h | 26 +-
19 files changed, 2364 insertions(+), 55 deletions(-)
create mode 100644 gdb/aarch64-lk-tdep.c
create mode 100644 gdb/arm-lk-tdep.c
create mode 100644 gdb/lk-bitmap.h
create mode 100644 gdb/lk-list.h
create mode 100644 gdb/lk-low.c
create mode 100644 gdb/lk-low.h
--
2.7.4
More information about the Gdb-patches
mailing list