From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8725 invoked by alias); 21 Oct 2009 14:26:03 -0000 Received: (qmail 8717 invoked by uid 22791); 21 Oct 2009 14:26:02 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 21 Oct 2009 14:25:57 +0000 Received: from mailhost2.vmware.com (mailhost2.vmware.com [10.16.67.167]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 39D275101F; Wed, 21 Oct 2009 07:25:56 -0700 (PDT) Received: from [10.20.94.141] (msnyder-server.eng.vmware.com [10.20.94.141]) by mailhost2.vmware.com (Postfix) with ESMTP id 1BF4F8E5C8; Wed, 21 Oct 2009 07:25:56 -0700 (PDT) Message-ID: <4ADF1871.5080004@vmware.com> Date: Wed, 21 Oct 2009 14:34:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: "nagaraju.m" CC: Paul Pluzhnikov , "gdb@sourceware.org" Subject: Re: processor threads References: <4ADD5C6F.10002@redpinesignals.com> <4ADDF828.6060504@vmware.com> <4ADE9F3E.1040200@redpinesignals.com> In-Reply-To: <4ADE9F3E.1040200@redpinesignals.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2009-10/txt/msg00331.txt.bz2 nagaraju.m wrote: > Hi Michael, > > I mean to say that we are having 4 hardware threads. Our company > has its own processor on which we will be working. The processor > currently we are working has 4 threads in it. > > Each thread has it own set of registers (ex: program counter). > > Currently the GDB which we are using is supporting only single > thread (ex: thread 0). > Now we trying to use GDB for remaining threads. > > My Question is does GDB handles hardware threads?? Good, thank you for the clarification. The answer is "yes and no". GDB supports threads, per se, but it doesn't have any special knowledge about hardware threads as opposed to any other kind of threads. What you can do (and what others have done successfully before), is just teach your remote server/stub/agent to tell gdb "I have four threads, and here are their register sets". Gdb will then just think of them as ordinary threads. Should be enough for you to get the job done, with maybe a few extra tweaks that can be snuck in as off-band monitor commands. Good luck, Michael