From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31551 invoked by alias); 30 Jul 2010 17:13:50 -0000 Received: (qmail 31537 invoked by uid 22791); 30 Jul 2010 17:13:48 -0000 X-SWARE-Spam-Status: No, hits=0.2 required=5.0 tests=AWL,BAYES_20 X-Spam-Check-By: sourceware.org Received: from etinternational-gw.customer.alter.net (HELO etinternational.com) (63.125.108.14) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 30 Jul 2010 17:13:44 +0000 Received: from [192.168.9.69] (random.xmen.eti [192.168.9.69]) (Authenticated sender: bheilig) by etinternational.com (Postfix) with ESMTPSA id 838EC138101 for ; Fri, 30 Jul 2010 13:13:42 -0400 (EDT) Subject: Porting gdb to Cyclops64 From: Brian Heilig To: gdb@sourceware.org Content-Type: text/plain; charset="UTF-8" Date: Fri, 30 Jul 2010 17:13:00 -0000 Message-ID: <1280510022.1560.20.camel@random> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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/msg00122.txt.bz2 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