From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13387 invoked by alias); 21 Jan 2015 17:52:41 -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 13366 invoked by uid 89); 21 Jan 2015 17:52:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail-oi0-f42.google.com Received: from mail-oi0-f42.google.com (HELO mail-oi0-f42.google.com) (209.85.218.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 21 Jan 2015 17:52:37 +0000 Received: by mail-oi0-f42.google.com with SMTP id i138so8065189oig.1 for ; Wed, 21 Jan 2015 09:52:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=2ImoKYXLWmh4H7wEPxr0344ufMLjEDDhjIK/LLRnJ00=; b=jUf3685shEjU2TBerdL2W56aLXEBv8xDIcoshTkI0fGF8cENuufPWTMsbRCAnNZYA7 68gwHdfYxuuLxH+Gcva1EDu+6hJONr0FpIf+RF01QNPZaRMXkw2Hz+6bJHEioa1LXt7s 2O4y+0kL0d2LLlZDwF57jRbXSUUrUZF8+e+XRE1kLIhHdMP8JK1Iv/7jvDAaSX73jKDc P1yPuj7qs0qZ3GSWHOuA3ZdSgMscfrcyhPivwQPR2Ogc41/0bu7eJRLEH7x4EDi0lxAr YLnFycrOn9nyle/KDR+3w9tSwq9kQcmPaaFn7N6NTGrShB4RyI5FwVZX8/kGWvjAwi0j mDow== X-Gm-Message-State: ALoCoQnHiL+vA+plo7wPaemV8v1t9U4NMNLPuYVglUXsf/ynlH7VeVdSdZ+5ttSqLvAVnzEbVHzv MIME-Version: 1.0 X-Received: by 10.202.59.136 with SMTP id i130mr356423oia.114.1421862755484; Wed, 21 Jan 2015 09:52:35 -0800 (PST) Received: by 10.182.222.98 with HTTP; Wed, 21 Jan 2015 09:52:35 -0800 (PST) In-Reply-To: <20150121094440.GA24515@adacore.com> References: <1421083588-927-1-git-send-email-brobecker@adacore.com> <20150113094426.GE8167@adacore.com> <20150114050051.GH8167@adacore.com> <20150121094440.GA24515@adacore.com> Date: Wed, 21 Jan 2015 17:52:00 -0000 Message-ID: Subject: Re: FYI: [python/Ada] gdb.lookup_type fails to looking primitive type From: Doug Evans To: Joel Brobecker Cc: gdb-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg00575.txt.bz2 On Wed, Jan 21, 2015 at 1:44 AM, Joel Brobecker wrote: >> > Not that I'm expecting anyone to go back and change things, >> > but maybe for future reference it'd be better to print the result >> > and record the expected output, instead of expecting no output. >> > Performing a lookup action, and then expecting no output, >> > is just too confusing to me. >> >> The only issue I have with that is that I'd like to do something >> whose behavior is defined. Looking at the GDB manual, I can't see >> anything said about what to expect when converting a gdb.Type to >> a string... If we clarify that, I have no problem adding the extra >> "print" in the test. > > I tried looking into the code as to what the semantics of printing > the gdb.Type object should be, and couldn't figure it out. It seems > to be printing the type name, but I'm not sure why. So, instead of > waiting for a clarification that may never come, I propose the > following. Ah, I didn't know you were waiting on me. I think printing the type name is just what was chosen at the time. That choice is fine by me fwiw. > gdb/ChangeLog: > > * gdb.python/py-lookup-type.exp (test_lookup_type): Change > the second test to print the name attribute of value > returned by the call to gdb.lookup_type, and adjust > the expected output accordingly. > > Tested on x86_64-linux. > > Does this change answer your concerns? There was no need to address anything, but thanks. I was just making a suggestion for the next time. [And I mean "suggestion" literally. 1/2 :-)] The patch is fine by me. Thanks again.