From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2775 invoked by alias); 2 Jan 2013 19:05:36 -0000 Received: (qmail 2636 invoked by uid 22791); 2 Jan 2013 19:05:34 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 02 Jan 2013 19:05:26 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r02J5O56031322 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 2 Jan 2013 14:05:24 -0500 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r02J5MJa012891 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 2 Jan 2013 14:05:23 -0500 From: Tom Tromey To: Doug Evans Cc: Tristan Su , gdb Subject: Re: can pahole print a struct definition in a given CU? References: <87fw2j5w4y.fsf@fleche.redhat.com> Date: Wed, 02 Jan 2013 19:05:00 -0000 In-Reply-To: (Doug Evans's message of "Wed, 2 Jan 2013 11:56:35 -0700") Message-ID: <87y5gbwglp.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2013-01/txt/msg00006.txt.bz2 >>>>> "Doug" == Doug Evans writes: Doug> Thus, Doug> what about adding a "context" parameter to parse_and_eval, etc.? Doug> And then provide a way to specify that context (e.g., both from the Doug> CLI and from Python). Doug> We'd still have to support "p 'bar.c'::foo + 'baz.c::foo'", but when, Doug> e.g, cut-n-pasting expressions from source we shouldn't have to force Doug> the user to insert 'bar.c::' in front of objects that gdb might end up Doug> otherwise picking the wrong one for. Doug> E.g., something like: (gdb) with-symtab bar.c p foo+baz Doug> or whatever. It would be fine by me. I was just pointing out the simplest way to make pahole work the same way ptype does. Really I would like to roll the pahole functionality into ptype. It is useful enough that there's no reason to need a second command for it. Tom