From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22609 invoked by alias); 27 Jun 2013 20:38:09 -0000 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 Received: (qmail 22598 invoked by uid 89); 27 Jun 2013 20:38:09 -0000 X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,T_FILL_THIS_FORM_SHORT autolearn=ham version=3.3.1 Received: from smarthost.idnet.net (HELO smarthost.idnet.net) (212.69.40.140) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 27 Jun 2013 20:38:07 +0000 Received: from m3.idnet.com (unknown [212.69.40.217]) by smarthost.idnet.net (Postfix) with ESMTP id 4B430236F7D for ; Thu, 27 Jun 2013 21:38:05 +0100 (BST) Received: from mail.idnet.net.uk (mail.idnet.net.uk [212.69.36.63]) by m3.idnet.com (Postfix) with ESMTP id 423DF2039A for ; Thu, 27 Jun 2013 21:38:05 +0100 (BST) Received: from [194.208.142.232] by mail.idnet.net.uk (GMS 17.01.3793/NU3963.00.7ca42f0c) with ESMTP via TLS id ojawgeda for gdb@sourceware.org; Thu, 27 Jun 2013 21:37:59 +0100 Message-ID: <51CCA2AB.1000008@embecosm.com> Date: Thu, 27 Jun 2013 20:38:00 -0000 From: Jeremy Bennett Reply-To: jeremy.bennett@embecosm.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: gdb@sourceware.org Subject: Why does "target remote" to a non-stop target stop one thread Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-AuthenticatedSender: jeremy.bennett.embecosm.com@idnet.net.uk X-SW-Source: 2013-06/txt/msg00063.txt.bz2 I'm working on GDB for a remote target, using non-stop mode. When I connect to the target, even in non-stop mode, it insists on stopping one thread. The comment in notice_new_inferior () is: > /* We're going to install breakpoints, and poke at memory, > ensure that the inferior is stopped for a moment while we do > that. */ My question is, why we need to stop any thread. Surely the whole point of non-stop mode is that we don't generally want to stop any threads if it can be avoided. I'd appreciate understanding the thinking behind this, before I start suggesting patches to change the behavior. Thanks, Jeremy -- Tel: +44 (1590) 610184 Cell: +44 (7970) 676050 SkypeId: jeremybennett Email: jeremy.bennett@embecosm.com Web: www.embecosm.com Twitter: @embecosm