From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12020 invoked by alias); 30 Jul 2010 20:28:59 -0000 Received: (qmail 12008 invoked by uid 22791); 30 Jul 2010 20:28:59 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00 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 20:28:55 +0000 Received: from [192.168.9.69] (random.xmen.eti [192.168.9.69]) (Authenticated sender: bheilig) by etinternational.com (Postfix) with ESMTPSA id 1B5CD138107 for ; Fri, 30 Jul 2010 16:28:54 -0400 (EDT) Subject: Re: Porting gdb to Cyclops64 From: Brian Heilig To: "gdb@sourceware.org" In-Reply-To: <4C5320B0.2070309@vmware.com> References: <1280510022.1560.20.camel@random> <4C530B30.1000603@vmware.com> <1280515973.1560.30.camel@random> <4C5320B0.2070309@vmware.com> Content-Type: text/plain; charset="UTF-8" Date: Fri, 30 Jul 2010 20:28:00 -0000 Message-ID: <1280521733.1560.44.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/msg00130.txt.bz2 On Fri, 2010-07-30 at 11:57 -0700, Michael Snyder wrote: > The default mode is synchronous debugging, which means that any time > you are looking at the gdb prompt, the target is stopped. > > It would probably be easiest to implement that first and get it working, > before attempting asynchronous mode. > > So yes, attaching with gdb should stop the target. Thanks again Michael. Since all threads execute in parallel, more than one thread can hit a breakpoint. In stop mode I should stop all threads when the first thread hits a breakpoint. While stopping all threads other threads might hit a breakpoint. My intention is to queue these "events" and report them in sequential order to gdb. So that, in stop mode, when gdb tells the target to continue it will actually dequeue the next event. If there are no events then it will continue. Does this sound correct? I guess I will have to implement non-stop mode as well since many threads can hit a breakpoint. It would be very inconvenient for my user to have to continue each thread individually. In this case I will not queue events but rather just send them to gdb and let gdb sort them out. Is this correct as well? Regards, Brian