From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107264 invoked by alias); 23 May 2019 20:36: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 107255 invoked by uid 89); 23 May 2019 20:36:53 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-22.4 required=5.0 tests=AWL,BAYES_00,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_PASS,USER_IN_DEF_SPF_WL autolearn=ham version=3.3.1 spammy= X-HELO: mail-ot1-f67.google.com Received: from mail-ot1-f67.google.com (HELO mail-ot1-f67.google.com) (209.85.210.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 May 2019 20:36:52 +0000 Received: by mail-ot1-f67.google.com with SMTP id c3so6696577otr.3 for ; Thu, 23 May 2019 13:36:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oEeBmu/1BTOOL7FRaX8jmI96yTKhkNxSu/ohykERWms=; b=H7ASuZsjzqKPt6HtzGKjsl0yh5MDnTGUrPGMFAGpqq/k6/WfHT1CdVDNqPDziOkWGz v1Jj6L7hcly5RD5ik0JG/LsTh0olOjIU+xlNsuwFxr6a6upShvjF5zj/qguLjxKVT3C8 N3nBco819QQZpBKtrc48hKLd/lPE8053aaBaLBMyuSkIw7Fk5RmZpYjNpmVxfRevfnMV UICblMFhQbQlzAoWr09fbgE7mMG493NfNtYAOG8Z5ck+MGS6pT2Sp+mGyPKlwXa5m+Zc RTDRHUDtlssZ0yeKEtPrNM3NQZm/lPmeb5hh95pOzdVcssQwQgMf7hlf8oi2XvxA5/fV C4kw== MIME-Version: 1.0 References: <20190523183935.209380-1-cbiesinger@google.com> In-Reply-To: From: "Christian Biesinger via gdb-patches" Reply-To: Christian Biesinger Date: Thu, 23 May 2019 20:36:00 -0000 Message-ID: Subject: Re: [PATCH] Add an objfile getter to gdb.Type To: Simon Marchi Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2019-05/txt/msg00551.txt.bz2 On Thu, May 23, 2019 at 2:34 PM Simon Marchi wrote: > > +/* Return the type's tag, or None. */ > > copy-pasto: "type's objfile" Done > > +static PyObject * > > +typy_get_objfile (PyObject *self, void *closure) > > +{ > > + struct type *type = ((type_object *) self)->type; > > + struct objfile *objfile = nullptr; > > + > > + objfile = TYPE_OBJFILE(type); > > You can write it as > > struct objfile *objfile = objfile = TYPE_OBJFILE (type); > > directly. > > We would need a corresponding test though. It should be a relatively easy addition > to testsuite/gdb.python/py-type.exp. See here for info about how to run just one > test: Done. I sent the updated patch as a separate email, I hope I did it right. Thanks, Christian