From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18416 invoked by alias); 23 Jun 2011 13:20:20 -0000 Received: (qmail 18395 invoked by uid 22791); 23 Jun 2011 13:20:19 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 23 Jun 2011 13:20:04 +0000 Received: (qmail 23768 invoked from network); 23 Jun 2011 13:20:03 -0000 Received: from unknown (HELO ?192.168.0.101?) (yao@127.0.0.2) by mail.codesourcery.com with ESMTPA; 23 Jun 2011 13:20:03 -0000 Message-ID: <4E033D7F.6090000@codesourcery.com> Date: Thu, 23 Jun 2011 13:20:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: Pedro Alves CC: gdb-patches@sourceware.org, Tom Tromey Subject: Re: [rfc] Call init_wait_for_inferior before get_offsets References: <4DFED6B3.2050700@codesourcery.com> <4E0316C1.10500@codesourcery.com> <201106231138.50006.pedro@codesourcery.com> In-Reply-To: <201106231138.50006.pedro@codesourcery.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes 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: 2011-06/txt/msg00349.txt.bz2 On 06/23/2011 06:38 PM, Pedro Alves wrote: > On Thursday 23 June 2011 11:34:41, Yao Qi wrote: > >>> Yao> * remote.c (remote_start_remote): ... here. > > There's another call to get_offsets in the else branch. > Yes, but there has been a call to init_wait_for_inferior () "guarded" at the beginning of that branch. else { /* Clear WFI global state. Do this before finding about new threads and inferiors, and setting the current inferior. Otherwise we would clear the proceed status of the current inferior when we want its stop_soon state to be preserved (see notice_new_inferior). */ init_wait_for_inferior (); ... ... get_offsets (); /* Get text, data & bss offsets. */ -- Yao (齐尧)