Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934480AbbEOLpg (ORCPT ); Fri, 15 May 2015 07:45:36 -0400 Received: from thoth.sbs.de ([192.35.17.2]:57432 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933731AbbEOLpe (ORCPT ); Fri, 15 May 2015 07:45:34 -0400 Message-ID: <5555DC5C.6090705@siemens.com> Date: Fri, 15 May 2015 13:45:32 +0200 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: =?UTF-8?B?VGhpw6liYXVkIFdla3N0ZWVu?= , linux-kernel@vger.kernel.org Subject: Re: [PATCH] scripts/gdb: Add ps command References: <1431581136-8808-1-git-send-email-thiebaud@weksteen.fr> In-Reply-To: <1431581136-8808-1-git-send-email-thiebaud@weksteen.fr> 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: 1375 Lines: 47 On 2015-05-14 07:25, ThiƩbaud Weksteen wrote: > Signed-off-by: ThiƩbaud Weksteen > --- > 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 0fa33b0..862a4ae 100644 > --- a/scripts/gdb/linux/tasks.py > +++ b/scripts/gdb/linux/tasks.py > @@ -66,6 +66,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 > Nice! Applied. Jan -- Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux -- 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/