From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17186 invoked by alias); 23 Jun 2011 13:46:40 -0000 Received: (qmail 17176 invoked by uid 22791); 23 Jun 2011 13:46:39 -0000 X-SWARE-Spam-Status: No, hits=-1.9 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:46:23 +0000 Received: (qmail 32079 invoked from network); 23 Jun 2011 13:46:22 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 23 Jun 2011 13:46:22 -0000 From: Pedro Alves To: Yao Qi Subject: Re: [rfc] Call init_wait_for_inferior before get_offsets Date: Thu, 23 Jun 2011 13:46:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-8-generic; KDE/4.6.2; x86_64; ; ) Cc: gdb-patches@sourceware.org, Tom Tromey References: <4DFED6B3.2050700@codesourcery.com> <201106231138.50006.pedro@codesourcery.com> <4E033D7F.6090000@codesourcery.com> In-Reply-To: <4E033D7F.6090000@codesourcery.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201106231446.20827.pedro@codesourcery.com> 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/msg00351.txt.bz2 On Thursday 23 June 2011 14:19:59, Yao Qi wrote: > 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. Bah, and I was the one that put it there even... :-) > > 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. */ Your patch is okay ... > + init_wait_for_inferior (); > + > get_offsets (); /* Get text, data & bss offsets. */ ... with a small comment above the init_wait_for_inferior call mentioning the reason it is called before get_offsets. -- Pedro Alves