From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7252 invoked by alias); 28 Jun 2013 08:15:12 -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 7233 invoked by uid 89); 28 Jun 2013 08:15:11 -0000 X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.1 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 28 Jun 2013 08:15:11 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1UsTpk-00043F-O8 from Yao_Qi@mentor.com ; Fri, 28 Jun 2013 01:15:08 -0700 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Fri, 28 Jun 2013 01:15:08 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.2.247.3; Fri, 28 Jun 2013 01:15:07 -0700 Message-ID: <51CD45EE.6030501@codesourcery.com> Date: Fri, 28 Jun 2013 08:15:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: CC: Subject: Re: Why does "target remote" to a non-stop target stop one thread References: <51CCA2AB.1000008@embecosm.com> In-Reply-To: <51CCA2AB.1000008@embecosm.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2013-06/txt/msg00068.txt.bz2 On 06/28/2013 04:38 AM, Jeremy Bennett wrote: > hen 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. Hi Jeremy, AFAIK, "non-stop" means when GDB is examining one stopped thread while other threads are _not stopped_. See http://sourceware.org/gdb/onlinedocs/gdb/Non_002dStop-Mode.html#Non_002dStop-Mode GDB needs the thread stopped because ptrace can't be performed on the running thread. -- Yao (齐尧)