From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29311 invoked by alias); 28 Jun 2013 13:47:00 -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 29297 invoked by uid 89); 28 Jun 2013 13:46:59 -0000 X-Spam-SWARE-Status: No, score=-4.7 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 13:46:58 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1UsZ0q-0004ac-48 from Luis_Gustavo@mentor.com ; Fri, 28 Jun 2013 06:46:56 -0700 Received: from NA1-MAIL.mgc.mentorg.com ([147.34.98.181]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 28 Jun 2013 06:46:56 -0700 Received: from [172.30.14.178] ([172.30.14.178]) by NA1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 28 Jun 2013 06:46:55 -0700 Message-ID: <51CD93C9.7090106@codesourcery.com> Date: Fri, 28 Jun 2013 13:47:00 -0000 From: Luis Machado Reply-To: lgustavo@codesourcery.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: jeremy.bennett@embecosm.com CC: Yao Qi , gdb@sourceware.org Subject: Re: Why does "target remote" to a non-stop target stop one thread References: <51CCA2AB.1000008@embecosm.com> <51CD45EE.6030501@codesourcery.com> <51CD8A52.1010905@embecosm.com> In-Reply-To: <51CD8A52.1010905@embecosm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-06/txt/msg00073.txt.bz2 On 06/28/2013 10:06 AM, Jeremy Bennett wrote: > On 28/06/13 10:14, Yao Qi wrote: >> 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. >> > Hi Yao, > > Thanks for the explanation. Since I am working on a RTOS that does not > use ptrace, and can perform actions on running threads, I don't need to > stop. So it looks like something like the patch suggested by Raphael > Zulliger that makes this configurable depending on the target would be a > useful. > > I'll work on this. > > > Jeremy > Does "set may-interrupt off" help any? Luis