From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2535 invoked by alias); 24 Mar 2008 22:28:56 -0000 Received: (qmail 2526 invoked by uid 22791); 24 Mar 2008 22:28:56 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 24 Mar 2008 22:28:36 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 8C89A983C6; Mon, 24 Mar 2008 22:28:34 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 2AD939810C; Mon, 24 Mar 2008 22:28:34 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1Jdv9a-0005Ec-Bh; Mon, 24 Mar 2008 18:28:30 -0400 Date: Tue, 25 Mar 2008 01:00:00 -0000 From: Daniel Jacobowitz To: Pawel Piech Cc: Vladimir Prus , gdb@sources.redhat.com Subject: Re: MI non-stop mode spec Message-ID: <20080324222830.GB17281@caradoc.them.org> Mail-Followup-To: Pawel Piech , Vladimir Prus , gdb@sources.redhat.com References: <200803190016.02072.vladimir@codesourcery.com> <47E3FA92.40409@windriver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47E3FA92.40409@windriver.com> User-Agent: Mutt/1.5.17 (2007-12-11) 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: 2008-03/txt/msg00211.txt.bz2 On Fri, Mar 21, 2008 at 11:12:34AM -0700, Pawel Piech wrote: > The Wind River debugger which implements the MI protocol, supprots > multi-core/multi-process debugging, non-stop and all-stop debugging modes > simultaneously (for different targets), uses the above protocol > extensions for several years now rather successfully. So I hope you > consider these suggestions seriously even if they are not easiest to > implement given the GDB architecture. Hi Pawel, Is there any documentation for Wind River's MI protocol which you could share with us as a basis? Either with the list, or privately with CodeSourcery - we have some NDAs in place with Wind River, if that's needed. Obviously you have some implementation experience that we'd love to benefit from here. Multi-core, multi-process, and multi-thread debugging are all different but they're very tightly related so thinking about them all at once may be best. GDB's only current support for multi-core models each core as a thread; in some cases that's exactly right, in some it isn't. Though perhaps we should break that out into a separate conversation. The current threading model is enough to make hopefully solid progress on non-stop for a single multi-threaded program. I think the most attractive option I've seen so far is to make automatic context switching optional. We could disable it by default when non-stop debugging is enabled. Or a smarter version: automatically switch contexts when we stop if previously selected thread was running. So if all threads are running and one thread gets an event, we will automatically switch to that thread; but if two threads stop in quick succession we'll leave the first one selected. That might be overly confusing for MI clients; I'm thinking about a hypothetical CLI version here. -- Daniel Jacobowitz CodeSourcery