From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29634 invoked by alias); 22 Oct 2008 20:06:29 -0000 Received: (qmail 29625 invoked by uid 22791); 22 Oct 2008 20:06:28 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 22 Oct 2008 20:05:34 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 211E82A9639; Wed, 22 Oct 2008 16:05:33 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id f4X-VLtePSMW; Wed, 22 Oct 2008 16:05:33 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id A82B42A9642; Wed, 22 Oct 2008 16:05:32 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 25C26E7AD0; Wed, 22 Oct 2008 13:05:28 -0700 (PDT) Date: Wed, 22 Oct 2008 20:06:00 -0000 From: Joel Brobecker To: ying lcs Cc: gdb@sourceware.org Subject: Re: how can I dump out thread informations in gdb Message-ID: <20081022200528.GL3632@adacore.com> References: <568e62a40810221301t301c7d46o9e1d4446d54abc7f@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <568e62a40810221301t301c7d46o9e1d4446d54abc7f@mail.gmail.com> User-Agent: Mutt/1.4.2.2i 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: 2008-10/txt/msg00095.txt.bz2 > Can you please tell me how can I print out what are all the existing > threads in my programs (while I hit a breakpoint)? > And what are the stack trace of each of those threads? I really recommend that you take a look at the GDB documentation: http://sourceware.org/gdb/current/onlinedocs/gdb_toc.html There is a section about debugging programs with multiple threads: http://sourceware.org/gdb/current/onlinedocs/gdb_5.html#SEC28 and also a section about how to get a backtrace: http://sourceware.org/gdb/current/onlinedocs/gdb_8.html#SEC54 -- Joel