public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Tim Black <timblaktu@gmail.com>
To: gdb@sourceware.org
Subject: Re: Loop over threads in python
Date: Mon, 04 Jun 2012 17:40:00 -0000	[thread overview]
Message-ID: <CA+23wiRZmt9hs3MCtj-Tgd3pY6AU=iD0Od5v03G=RxwU5U6+SA@mail.gmail.com> (raw)
In-Reply-To: <CA++fsGGETEPcjrM9igkwBxofK-uOv0MnOsAJoW0VGGQrqfKtFg@mail.gmail.com>

This article gives a good overview of driving gdb with python and
answers your question: http://www.linuxjournal.com/article/11027

On Sun, Jun 3, 2012 at 11:40 PM, Dov Grobgeld <dov.grobgeld@gmail.com> wrote:
> Hello,
>
> I would like to write a python command that lists all threads (of a
> C++ program) that in its call path has a function matching a user
> specified pattern.
>
> To do that I have to iterate over all the threads. But I couldn't find
> such a python API. Do I currently have to resort to using gdb commands
> and parsing the output myself?
>
> Thanks!
> Dov

  reply	other threads:[~2012-06-04 17:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CA++fsGEES6rmeqWK9C5nyKH30+agT5ie+cY5tXMKpCx_0Cokhg@mail.gmail.com>
2012-06-04  6:40 ` Dov Grobgeld
2012-06-04 17:40   ` Tim Black [this message]
2012-06-05  5:28     ` Dov Grobgeld
2012-06-06 18:11       ` Tom Tromey

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='CA+23wiRZmt9hs3MCtj-Tgd3pY6AU=iD0Od5v03G=RxwU5U6+SA@mail.gmail.com' \
    --to=timblaktu@gmail.com \
    --cc=gdb@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).