Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756504AbbEVF6l (ORCPT ); Fri, 22 May 2015 01:58:41 -0400 Received: from david.siemens.de ([192.35.17.14]:35627 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755795AbbEVF6Y (ORCPT ); Fri, 22 May 2015 01:58:24 -0400 From: Jan Kiszka To: Andrew Morton Cc: linux-kernel@vger.kernel.org, =?UTF-8?q?Thi=C3=A9baud=20Weksteen?= Subject: [PATCH 6/7] scripts/gdb: Add ps command Date: Fri, 22 May 2015 07:58:16 +0200 Message-Id: <4b6d98e17096a368089d00956f96ebe1ae0b149c.1432274297.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1251 Lines: 43 From: ThiƩbaud Weksteen Signed-off-by: ThiƩbaud Weksteen Signed-off-by: Jan Kiszka --- scripts/gdb/linux/tasks.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/scripts/gdb/linux/tasks.py b/scripts/gdb/linux/tasks.py index 89d38e1..3191f47 100644 --- a/scripts/gdb/linux/tasks.py +++ b/scripts/gdb/linux/tasks.py @@ -67,6 +67,22 @@ return that task_struct variable which PID matches.""" LxTaskByPidFunc() +class LxPs(gdb.Command): + """Dump Linux tasks.""" + + def __init__(self): + super(LxPs, self).__init__("lx-ps", gdb.COMMAND_DATA) + + def invoke(self, arg, from_tty): + for task in task_lists(): + gdb.write("{address} {pid} {comm}\n".format( + address=task, + pid=task["pid"], + comm=task["comm"].string())) + +LxPs() + + thread_info_type = utils.CachedType("struct thread_info") ia64_task_size = None -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/