From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2263 invoked by alias); 6 Feb 2015 06:14:27 -0000 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 Received: (qmail 2228 invoked by uid 89); 6 Feb 2015 06:14:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ig0-f193.google.com Received: from mail-ig0-f193.google.com (HELO mail-ig0-f193.google.com) (209.85.213.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 06 Feb 2015 06:14:26 +0000 Received: by mail-ig0-f193.google.com with SMTP id h15so5428igd.0 for ; Thu, 05 Feb 2015 22:14:24 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.107.136.7 with SMTP id k7mr8895999iod.59.1423203264324; Thu, 05 Feb 2015 22:14:24 -0800 (PST) Received: by 10.36.6.144 with HTTP; Thu, 5 Feb 2015 22:14:24 -0800 (PST) Date: Fri, 06 Feb 2015 06:14:00 -0000 Message-ID: Subject: How to get all threads of a definite process? From: fei ding To: gdb@sourceware.org Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00009.txt.bz2 Hi, everyone: I want to get all threads of one definite process, and I've found some data structure such as 'all_threads', which is not what I want, i guess. I don't understand the relationship between process and thread, from the gdb-source-code-level (pointers for example), and I don't understand the meaning of 'ptid_t', does this mean 'process_thread_id' ? and I've found this data's value is not the thread's PID that Linux shell tell me, it just some number like 0 or 1. If you know something about this, please help me. Thanks. BR.