From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 35570 invoked by alias); 29 Jan 2019 05:03:45 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 35562 invoked by uid 89); 29 Jan 2019 05:03:45 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=BAYES_00,GIT_PATCH_3,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=201803, 2018-03, H*Ad:D*co.uk, Kernel X-HELO: mail-wr1-f68.google.com Received: from mail-wr1-f68.google.com (HELO mail-wr1-f68.google.com) (209.85.221.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 29 Jan 2019 05:03:43 +0000 Received: by mail-wr1-f68.google.com with SMTP id p7so20583341wru.0 for ; Mon, 28 Jan 2019 21:03:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=6mb0XAIYTb45GPPhXoSs2aj0Tfs2Pq8/UTy0Sr3wWSw=; b=ClW3LhRRXR3M8k7rLIq8CSVsboV0TXmNtCQsS6bSxQ79MGjdEJmhtyyeI9M2ZFnI+j oP9125NiBcuFkqcs/BBoQYO7iYv9KiB+2zZfdkyB/1mmxwLTGbOrxVqrN5hkyGzR5UVB 4oOlqdk1nyr+4guE5ZhqVCZbqX4Pln7SJYvqg= Return-Path: Received: from localhost.localdomain ([43.251.253.48]) by smtp.gmail.com with ESMTPSA id s1sm170325615wro.9.2019.01.28.21.03.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jan 2019 21:03:39 -0800 (PST) From: Omair Javaid To: gdb-patches@sourceware.org Cc: palves@redhat.com, prudo@linux.ibm.com, arnez@linux.vnet.ibm.com, peter.griffin@linaro.org, Ulrich.Weigand@de.ibm.com, kieran@linuxembedded.co.uk, Omair Javaid Subject: [RFC PATCH 0/6] Support for Linux kernel thread aware debug Date: Tue, 29 Jan 2019 05:03:00 -0000 Message-Id: <1548738199-9403-1-git-send-email-omair.javaid@linaro.org> X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00596.txt.bz2 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