From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5495 invoked by alias); 30 Jul 2010 17:26:18 -0000 Received: (qmail 5484 invoked by uid 22791); 30 Jul 2010 17:26:17 -0000 X-SWARE-Spam-Status: No, hits=-4.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.115.85.69) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 30 Jul 2010 17:26:12 +0000 Received: from mailhost4.vmware.com (mailhost4.vmware.com [10.16.67.124]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id D2D6A130BF; Fri, 30 Jul 2010 10:26:08 -0700 (PDT) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost4.vmware.com (Postfix) with ESMTP id C3213C9B2C; Fri, 30 Jul 2010 10:26:08 -0700 (PDT) Message-ID: <4C530B30.1000603@vmware.com> Date: Fri, 30 Jul 2010 17:26:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.22 (X11/20090609) MIME-Version: 1.0 To: Brian Heilig CC: "gdb@sourceware.org" Subject: Re: Porting gdb to Cyclops64 References: <1280510022.1560.20.camel@random> In-Reply-To: <1280510022.1560.20.camel@random> Content-Type: text/plain; charset=UTF-8; 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: 2010-07/txt/msg00123.txt.bz2 Brian Heilig wrote: > Dear list, > > My name is Brian Heilig and I am porting gdb 7.1-90 to the Cyclops64 > architecture. Cyclops64 has 80 cores and each core has 2 thread units > for a total of 160 threads units, all running in parallel. Each thread > unit executes the same code and can access shared memory or its own > thread memory (http://en.wikipedia.org/wiki/SPMD). A traditional thread > model is also supported where SPMD threads can spawn other threads. > > I have integrated a gdb server into our kernel and integrated the target > architecture into the gdb client. Right now I can remote debug a program > on the target but it doesn't handle multiple threads well. > > When multiple threads are stopped at a breakpoint (or stopped for some > other reason) I should be able to step through the current thread. When > I do gdb is commanding the target to step the current thread and > continue all others like "$vCont;s:1;c". > > The plan is to step the current thread and leave all others stopped > until I tell it to continue. If multiple threads stop at a breakpoint > then the target will queue these events. When the target is told to > continue it will notify the client that the next thread has stopped at a > breakpoint. If the user desires they can switch to another thread that > is stopped and step it. > > Does gdb support the operation 'step the current thread and leave all > other threads stopped'? Is there some mode or variable I need to set in > the target architecture description to enable this? What is gdb's > behavior now for multi-core architectures? > > Thanks, > Brian Yes, see "set scheduler-locking". http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/gdb/thread-stops.html