From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29491 invoked by alias); 6 Jan 2015 09:44:53 -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 29471 invoked by uid 89); 6 Jan 2015 09:44:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f182.google.com Received: from mail-wi0-f182.google.com (HELO mail-wi0-f182.google.com) (209.85.212.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 06 Jan 2015 09:44:51 +0000 Received: by mail-wi0-f182.google.com with SMTP id h11so4965797wiw.3 for ; Tue, 06 Jan 2015 01:44:48 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.180.109.45 with SMTP id hp13mr34469632wib.4.1420537488234; Tue, 06 Jan 2015 01:44:48 -0800 (PST) Received: by 10.27.39.198 with HTTP; Tue, 6 Jan 2015 01:44:48 -0800 (PST) In-Reply-To: <20150105030431.GE5445@adacore.com> References: <20150105030431.GE5445@adacore.com> Date: Tue, 06 Jan 2015 09:44:00 -0000 Message-ID: Subject: Re: [RFC] Empty result of "info types inner": Is this a bug? From: Doug Evans To: Joel Brobecker , Pedro Alves Cc: "gdb-patches@sourceware.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg00069.txt.bz2 On Sun, Jan 4, 2015 at 7:04 PM, Joel Brobecker wrote: >> Technically, it's a bug that the first "info types inner" didn't >> print anything, but is this a bug we're willing to accept for >> performance reasons? I want to make the case that the answer is "No." > > My inclination as well, and you'll probably see in dwarf2read.c > a few added blocks of code that say "if (ada an some other langs), > add children into global scope. That was for things such as putting > a breakpoint on a nested subprogram, for instance. For completeness sake, another way to solve this particular bug is to traverse all the debug info but not expand every (matching) symtab. Yeah, it'll be slower, but info var/fun/types doesn't scale, plus regexp matching means we have to make "o::b" find "foo::bar", and is it better to try to make that scale, or provide the user with something else that does scale for the common case(s)? IOW, what are the common uses of info var/fun/types and can we require a different argument besides a simple regex such that the implementation can scale? [We'd still keep info/var/types, but the implementation, while fixing the bug under discussion, would not be intended to be fast for large programs, and nor would it result in significantly increased memory usage by gdb. I can imagine it just walking all the DWARF info but not expanding any symtabs.]