From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 112013 invoked by alias); 16 May 2018 15:46:28 -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 111991 invoked by uid 89); 16 May 2018 15:46:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=H*UA:Roundcube, H*u:Roundcube, H*F:D*ca, Whats X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 16 May 2018 15:46:25 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id w4GFkIiV006795 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 16 May 2018 11:46:23 -0400 Received: by simark.ca (Postfix, from userid 112) id 600041F219; Wed, 16 May 2018 11:46:18 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 0002C1E512; Wed, 16 May 2018 11:46:16 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Wed, 16 May 2018 15:52:00 -0000 From: Simon Marchi To: Pedro Alves Cc: Joel Brobecker , gdb-patches@sourceware.org Subject: Re: [RFC] (windows) GDB/MI crash when using "-list-thread-groups --available" In-Reply-To: References: <1525978704-70543-1-git-send-email-brobecker@adacore.com> Message-ID: <81952681aacf4123fd897dfa330efd6b@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.6 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Wed, 16 May 2018 15:46:18 +0000 X-IsSubscribed: yes X-SW-Source: 2018-05/txt/msg00349.txt.bz2 On 2018-05-11 12:45, Pedro Alves wrote: > After the inferior is started, the Windows target is pushed in the > target > stack, so there will be a target beneath, either the exec target, or > the > dummy target directly. Either of those returns TARGET_XFER_E_IO for > this target object. > > The issue here is that before the inferior is started, the > Windows target is not pushed on the target stack. > See target_get_osdata. Ah ok, so the target is used without being pushed? I didn't know it was possible. >> which provides the list of available processes on Windows? > > I don't think the feature works at all on Windows. It's probably > returning an empty list of processes. But Joel reported that the test case fails due to the expect buffer being full, so the list must not be empty... we'll need clarifications from him :) >> What's the difference between the new test case and >> gdb.mi/list-thread-groups-available.exp?  In that one too, >> -list-thread-groups --available is executed with no inferior started.  >> It also uses mi_gdb_test though, so it probably hits the same >> limitation. > > I've actually saw that testcase fail before because of this issue. :-) > I probably saw it when I was running many test jobs in parallel (thus > many > processes) or something like that. It should be fairly easy to reproduce, start a few thousands "sleep 100 &" processes and then run the test case. >> As a quick and dirty hack, is it possible to just increase temporarily >> the size of the buffer to something that will surely be large enough?  >> Otherwise, using gdb_test_multiple or maybe gdb_expect to consume the >> output little by little sounds good. > > Yeah, the best way to address this is to consume > output in chunks, with exp_continue. That fixes it for good. > See for example: > > commit 11859c310cd6b6fd892337a5ee1d36921e6d08d8 > Author: Andrew Burgess > AuthorDate: Mon Apr 9 00:18:34 2018 +0100 > > gdb/testsuite: Handle targets with lots of registers > > > I'd prefer that over increasing buffer sizes. Of course! Simon