public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: "Thiébaud Weksteen" <thiebaud@weksteen.fr>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scripts/gdb: Add ps command
Date: Fri, 15 May 2015 13:45:32 +0200	[thread overview]
Message-ID: <5555DC5C.6090705@siemens.com> (raw)
In-Reply-To: <1431581136-8808-1-git-send-email-thiebaud@weksteen.fr>

On 2015-05-14 07:25, Thiébaud Weksteen wrote:
> Signed-off-by: Thiébaud Weksteen <thiebaud@weksteen.fr>
> ---
>  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

      reply	other threads:[~2015-05-15 11:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-14  5:25 [PATCH] scripts/gdb: Add ps command Thiébaud Weksteen
2015-05-15 11:45 ` Jan Kiszka [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5555DC5C.6090705@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thiebaud@weksteen.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox