From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36577 invoked by alias); 4 Oct 2019 13:46:27 -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 36563 invoked by uid 89); 4 Oct 2019 13:46:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=andre, H*r:encrypted, H*F:D*t-online.de, H*r:sk:mailout X-HELO: mailout03.t-online.de Received: from mailout03.t-online.de (HELO mailout03.t-online.de) (194.25.134.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 04 Oct 2019 13:46:25 +0000 Received: from fwd22.aul.t-online.de (fwd22.aul.t-online.de [172.20.26.127]) by mailout03.t-online.de (Postfix) with SMTP id 2718142A03AB; Fri, 4 Oct 2019 15:46:23 +0200 (CEST) Received: from localhost (SOGzg2ZDQhXk3wZv0gBuiUwhShCZI5Gc6DM26HjTB5PWhSgzs0w2QAghXRqYe0xwgO@[80.143.213.12]) by fwd22.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1iGNuL-1fCHya0; Fri, 4 Oct 2019 15:46:09 +0200 Date: Fri, 04 Oct 2019 13:46:00 -0000 From: =?iso-8859-1?Q?Andr=E9_P=F6nitz?= To: Simon Marchi Cc: Andrew Burgess , gdb-patches Subject: Re: [PATCH 3/3] gdb/mi: Add new commands -symbol-info-{functions,variables,types} Message-ID: <20191004134845.GA1528@klara> References: <32bedef4-727e-ad35-318b-8ebc18924583@simark.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <32bedef4-727e-ad35-318b-8ebc18924583@simark.ca> X-IsSubscribed: yes X-SW-Source: 2019-10/txt/msg00153.txt.bz2 On Thu, Oct 03, 2019 at 11:01:12PM -0400, Simon Marchi wrote: > On 2019-09-26 7:09 p.m., Andrew Burgess wrote: > > Add new MI commands -symbol-info-functions, -symbol-info-variables, > > and -symbol-info-types which correspond to the CLI commands 'info > > functions', 'info variables', and 'info types' respectively. > > Hi Andrew, > > The first thing I tried was to run it on GDB itself and run "-symbol-info-functions" > by itself. Apparently, it tries to list all functions in the program :). I think > we need to be careful with that, as it would be really easy for a debug session to > become unresponsive. Imagine an IDE that has a little box to search symbols by name. > The user while debugging a big program, types "e", which generates this > MI command: > > -symbol-info-functions --name "e" > > This would essentially hang the debug session while GDB expands all the symtabs with > at least a function with "e" in its name. It would take a huge amount of time and > memory. I don't know how easy it would be to implement, but for these cases, a > "--max-results N" switch, which would stop the search early, might useful. >From an (one...) IDE's point of view, any such limit setting would be desirable, and I'd personally would appreciate some limit on time, with the result record indication on whether the result is complete or the timeout was hit. > [...] > > Also, since this output is meant to be consumed by a front-end, it would be > interesting to have the details of the symbols in separate fields. For example, > for variables, have the type and name in separate fields. This gives front-ends > more freedom on how to display them. Indeed. Andre'