From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7238 invoked by alias); 6 Apr 2012 16:42:34 -0000 Received: (qmail 7228 invoked by uid 22791); 6 Apr 2012 16:42:30 -0000 X-SWARE-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-qa0-f48.google.com (HELO mail-qa0-f48.google.com) (209.85.216.48) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 06 Apr 2012 16:41:46 +0000 Received: by qam2 with SMTP id 2so496262qam.0 for ; Fri, 06 Apr 2012 09:41:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-system-of-record :x-gm-message-state; bh=n43eoZ5gewtAJxVD7maYJ9fyUWAQT7qvbPj+HJPnXkc=; b=NAXmTiyeIDh/gQalmwKGmhiSxF8ch4uGfe83x643axE55uKV0Tg3nHsqCGJRJisyt4 0PaktPrKqis4SlGSQUdVRbWl61k4PCK98Dv1vCE3VexonN+Zee92iR/BeR0n6ZT+SQDT GHm8wW5gHjcKjwi148HYChchzpQlvUEP9hSTZV6lYBUPpYPenEQVKHZ5Nn4kJPBecT80 S1LqsNeXhkBiXZZ6CZwXeuwEe55IBA6H5c/kRdvNMvZFfrB+yiX+Nx/vgTWrb//tlbGV muIrPQTb3sG8pA+kiLFE997LOcAgtYqZCn9azT3hMlX2Xcy06My24DdKhg3Sad11FgVX UddQ== Received: by 10.229.136.10 with SMTP id p10mr2888430qct.46.1333730505388; Fri, 06 Apr 2012 09:41:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.136.10 with SMTP id p10mr2888423qct.46.1333730505217; Fri, 06 Apr 2012 09:41:45 -0700 (PDT) Received: by 10.224.188.140 with HTTP; Fri, 6 Apr 2012 09:41:45 -0700 (PDT) In-Reply-To: References: <09787EF419216C41A903FD14EE5506DD0313D5C22C@AUSX7MCPC103.AMER.DELL.COM> Date: Fri, 06 Apr 2012 16:42:00 -0000 Message-ID: Subject: Re: [RFC - Python Scripting] New method Objfile.symtabs () - docs included From: Siva Chandra To: gdb-patches@sourceware.org Cc: Tom Tromey , Doug Evans Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-Gm-Message-State: ALoCoQmS5LXOhMzku/5dXBjkClRJpcjRbCIbr3aHksxZB9V/RRL4D6y0qz9CqD2COjv+NEtB4ZaehLVnlCZafiCNR9eyER5zPN/E1KYeykDZAfbRRhPbcyHb+6AOlD3S5edclfE7LXSYoI9JXnv+W71/W5YkToceqg== 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: 2012-04/txt/msg00108.txt.bz2 Tom> How about just the plain Objfile.iterator(REGEX)? Tom> It would return an iterator that lazily instantiates symtabs. Tom> (Or, at least conceptually lazily instantiates them, as it isn't clear Tom> that this is efficiently implementable with the current Tom> quick_symbol_functions API.) Is this equivalent to what Paul Koning suggests and has the same problem which Doug Evans points out (source file matching with a REGEX aside)? Paul> How about having symtabs() return the iterator instead? Doug> In a nutshell: If "list (objfile.symtabs())" can increase gdb's memory Doug> usage by gigabytes, then it's a non-starter (IMO). Doug> Before we provide anything along these lines, we need to fix the Doug> underlying problem. Doug> I can think of a simple(quick) solution: create the symtab object when Doug> the psymtab object is created (suitably modified to clean up anything Doug> obvious), but not expand it. =A0[btw, Psymtabs at the moment aren't as Doug> much of an implementation detail as we want them to be (IMO).] It's Doug> not perfect: Depending on what you want from the symtab you may Doug> ultimately end up expanding everything anyway. =A0But it's a step. = =A0One Doug> way to go would be to build into gdb the ability to discard the Doug> expansion say when memory gets tight. =A0I think there's room for Doug> improvement before we get to that though. I am OK to think through this proposal. I will need some time to understand and come up with something. Thanks, Siva Chandra