From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15613 invoked by alias); 18 May 2009 19:59:24 -0000 Received: (qmail 15604 invoked by uid 22791); 18 May 2009 19:59:24 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 18 May 2009 19:59:17 +0000 Received: (qmail 14512 invoked from network); 18 May 2009 19:59:15 -0000 Received: from unknown (HELO macbook-2.local) (stan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 18 May 2009 19:59:15 -0000 Message-ID: <4A11BE08.3090900@codesourcery.com> Date: Mon, 18 May 2009 19:59:00 -0000 From: Stan Shebs User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: Tristan Gingold CC: gdb-patches@sourceware.org Subject: Re: RFA: makes darwin-nat.c threads (and multi-processes) aware References: <20090319141746.GA81236@ulanbator.act-europe.fr> In-Reply-To: <20090319141746.GA81236@ulanbator.act-europe.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-05/txt/msg00373.txt.bz2 Tristan Gingold wrote: > Hi, > > at AdaCore we have an improved version of darwin-nat.[ch] that is in use for a > few months. It is mostly rewritten to handle threads and multi-processes. It > also handles more corner cases in breakpoints handling. > > The number of regression is about 220 (to be compared to about 600 for the > original version). Good progress! > Indeed! I've reviewed this (sorry about the delay) and it looks generally good for committing. I just have a couple nits. + /* Current message state. + If the kernel has sent a message it expects a reply and the inferior + can't be killed before. */ + enum darwin_msg_state { DARWIN_RUNNING, + DARWIN_STOPPED, + DARWIN_MESSAGE } msg_state; I'm not sure if there's official style on this point, but I think it's better to make enums globally visible. It generally seems to be the case that someone somewhere will eventually find multiple uses for the enum values, might as well accommodate them. - darwin_ops->to_has_thread_control = tc_schedlock /*| tc_switch */; + /* darwin_ops->to_has_thread_control = tc_schedlock | tc_switch */; Might as well just whack the whole line. If someone really wants to know what happened, CVS has the record. Seeing all the inferior_debug calls with different args, while I'm working on fixing up tracepoints, gets me to thinking about whether we can use tracepoints instead of ever-more debug printfs in GDB (looks bad when the chefs in the kitchen send next door for takeout :-) ), but that's a subject of its own... Stan