From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4260 invoked by alias); 2 Jan 2013 19:06:16 -0000 Received: (qmail 4215 invoked by uid 22791); 2 Jan 2013 19:06:15 -0000 X-SWARE-Spam-Status: No, hits=-5.6 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-ob0-f180.google.com (HELO mail-ob0-f180.google.com) (209.85.214.180) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 02 Jan 2013 19:06:09 +0000 Received: by mail-ob0-f180.google.com with SMTP id wd20so13274415obb.11 for ; Wed, 02 Jan 2013 11:06:09 -0800 (PST) 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:x-gm-message-state; bh=Cwia8oYoBJHUDVrEufhe8nMxFYcAJv7TDUy/VQ3SuIM=; b=iyemlWxbfS9BKkrP9OU6ZjZGksZZgoMJEsZbwydc65SFNLEFWzZyt0xoysB01cfjll 6JDapj2Ok+Pi6UtAr6CRIut6zYQcqcPnWWSSKrfT3pApiqwEJU/Kf7bPz6M8Bx0q9dVc CqwX65BokND5lKckWcTkWxp8i7xTCezzNGagHdlpT637LyI9iYmWrM+EtEZq86hxewvh b1j2h+RPe8xFr/LEZ8paZhY09sIvwip/mT6e64rLnGNMDAe/4DYwemLoFZ9iDutnFPfy xihvhdaMisv4XbBPiaxJbUzVi0872legQLzQd2l9zfQ5uqUoURsM8E9n1hCjxh9i0uEE dX5g== MIME-Version: 1.0 Received: by 10.60.169.76 with SMTP id ac12mr26090477oec.137.1357153569185; Wed, 02 Jan 2013 11:06:09 -0800 (PST) Received: by 10.76.87.101 with HTTP; Wed, 2 Jan 2013 11:06:09 -0800 (PST) In-Reply-To: References: <87fw2j5w4y.fsf@fleche.redhat.com> Date: Wed, 02 Jan 2013 19:06:00 -0000 Message-ID: Subject: Re: can pahole print a struct definition in a given CU? From: Doug Evans To: Tom Tromey Cc: Tristan Su , gdb Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQk980bb985VPwYTbSJ2oR0w0Nh/VBrGFkm6s1RchdI7gyeAyS1FzcAdh+pzJdna8EGs5+Qja8fe0i/Kg1J1nHsQULtHFAfRQqz8x2f1hcKcD7KSHEyW2vxre0wMYClHJGK/Kcj7A9T2aJRLrzbr9fVnPrRwPUosLNuBVk9yMIDipQ34lENbhKvpefBxf8Q3SsbrS+I6 X-IsSubscribed: yes 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/msg00007.txt.bz2 On Wed, Jan 2, 2013 at 11:56 AM, Doug Evans wrote: > [...] > Thus, > what about adding a "context" parameter to parse_and_eval, etc.? > And then provide a way to specify that context (e.g., both from the > CLI and from Python). > >[...] > > E.g., something like: (gdb) with-symtab bar.c p foo+baz > or whatever. [Sorry for the followup.] To make that work with breakpoint expressions, etc., it would be preferable to still encode the symtab in the expression string, but at an outer level and not embedded in it. I realize this syntax is problematic, but for illustration's sake: p (foo+baz)@bar.c >From Python: gdb.parse_and_eval ("foo+baz", symtab=blah) or whatever.