From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2923 invoked by alias); 4 Jun 2012 06:40:44 -0000 Received: (qmail 2914 invoked by uid 22791); 4 Jun 2012 06:40:43 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-ob0-f169.google.com (HELO mail-ob0-f169.google.com) (209.85.214.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 04 Jun 2012 06:40:31 +0000 Received: by obbwd18 with SMTP id wd18so8407307obb.0 for ; Sun, 03 Jun 2012 23:40:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.60.26.65 with SMTP id j1mr11047036oeg.9.1338792030773; Sun, 03 Jun 2012 23:40:30 -0700 (PDT) Received: by 10.182.33.42 with HTTP; Sun, 3 Jun 2012 23:40:30 -0700 (PDT) In-Reply-To: References: Date: Mon, 04 Jun 2012 06:40:00 -0000 Message-ID: Subject: Loop over threads in python From: Dov Grobgeld To: gdb@sourceware.org Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-06/txt/msg00021.txt.bz2 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