From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 58225 invoked by alias); 4 Jul 2016 17:22:21 -0000 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 Received: (qmail 58207 invoked by uid 89); 4 Jul 2016 17:22:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.0 required=5.0 tests=BAYES_40,SPF_PASS autolearn=ham version=3.3.2 spammy=simon, Simon, sk:inferio, Marchi X-HELO: usplmg20.ericsson.net Received: from usplmg20.ericsson.net (HELO usplmg20.ericsson.net) (198.24.6.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 04 Jul 2016 17:22:19 +0000 Received: from EUSAAHC005.ericsson.se (Unknown_Domain [147.117.188.87]) by usplmg20.ericsson.net (Symantec Mail Security) with SMTP id A2.EF.09012.0C09A775; Mon, 4 Jul 2016 18:37:20 +0200 (CEST) Received: from [142.133.110.144] (147.117.188.8) by smtp-am.internal.ericsson.com (147.117.188.89) with Microsoft SMTP Server id 14.3.294.0; Mon, 4 Jul 2016 13:22:16 -0400 Subject: Re: [pushed] Fix gdbserver/MI testing regression To: Pedro Alves , References: <1462538104-19109-1-git-send-email-palves@redhat.com> <1462538104-19109-32-git-send-email-palves@redhat.com> <5772DBCA.4090802@ericsson.com> <813555f3-c917-cd95-6d41-3ec64cad2cf6@redhat.com> <14e113dd-0488-79d0-6cde-82cdb1562793@redhat.com> From: Simon Marchi Message-ID: <577A9B48.6010307@ericsson.com> Date: Mon, 04 Jul 2016 17:22:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <14e113dd-0488-79d0-6cde-82cdb1562793@redhat.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-07/txt/msg00042.txt.bz2 On 16-06-30 07:12 AM, Pedro Alves wrote: > On 06/29/2016 11:50 AM, Pedro Alves wrote: >> On 06/28/2016 09:19 PM, Simon Marchi wrote: >>> I added a few traces to understand what's happening, and it seems that inferior_spawn_id >>> is being unset at two places: > > Indeed. > >>> The easy way would be to add a "info exists" check before unsetting it, but I don't know if >>> that would only hide a real problem. > > I went ahead and pushed the patch below, with takes an even easier route. > > I think we'll need to do something better in at least a couple scenarios: > > - If/when gdbserver learns about "set inferior-tty", the separate > inferior tty spawn id should be used instead of gdbserver's. gdbserver > doesn't support that, so in tests that use that (or MI's equivalent), > inferior output indeed is sent to gdbserver's tty. > > - Tests that disconnect from gdbserver/restart gdb/reconnect to gdbserver > should end up inferior_spawn_id set to gdbserver's spawn id, > otherwise tests that rely on inferior I/O, after the reconnect won't work > properly. I think there's no such test currently, though, so I'm ignoring > this for now. Thanks! Your patch fixes the problem I initially encountered. Simon