From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12080 invoked by alias); 9 Oct 2014 19:10:03 -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 12071 invoked by uid 89); 9 Oct 2014 19:10:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 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-vc0-f178.google.com Received: from mail-vc0-f178.google.com (HELO mail-vc0-f178.google.com) (209.85.220.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 09 Oct 2014 19:10:02 +0000 Received: by mail-vc0-f178.google.com with SMTP id hq12so1486646vcb.23 for ; Thu, 09 Oct 2014 12:09:59 -0700 (PDT) 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:content-type; bh=DwtGGsUcxRoXq80AvdOX1cS6j/C8+KtVtW3A521eAt4=; b=M2CLrjp4OuYwtylnmrwBSjr1LxJV8HBl82xq/aYD95/VFUnWk9weTiNDaL5tX0ndBh b3KFEQmsbd8zwMRcx4biZqgaEnj9+vGEeDbISemSrOTktjSrsVsUtOZ38fGLHTb1t1G8 DQ0Rgd2yt+RQYJtxxWkwLm7Zvg2pgPyPveFpp0rVaezCEnNRWeI1HeEuMvK+D0xhoWoC XA4HAKEjDNuSMSwWuzG0Yyd50ojY2rH+JzQGEYsM6ZNqU/JBwkfqws7g8MwWlFtVpzMl 7kyD5tKXUs3/HHkp2SgFy7V2AHSsiZa4Q4sS131VsNOQGs/IYRT76leVo5jec0EthTej K4TA== X-Gm-Message-State: ALoCoQlOCWOVHCFt61SM7TuA+u4J/9DqEmO6sSVc9l9ULBaxdSeinOXcI2aJrOsy3QSpJdyORMII MIME-Version: 1.0 X-Received: by 10.221.61.136 with SMTP id ww8mr149173vcb.70.1412881799403; Thu, 09 Oct 2014 12:09:59 -0700 (PDT) Received: by 10.52.181.65 with HTTP; Thu, 9 Oct 2014 12:09:59 -0700 (PDT) In-Reply-To: References: Date: Thu, 09 Oct 2014 19:10:00 -0000 Message-ID: Subject: Re: [PATCH, doc RFA] Add ability to set random attributes in python objfiles,progspaces From: Doug Evans To: gdb-patches , Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00222.txt.bz2 On Thu, Oct 9, 2014 at 12:08 PM, Doug Evans wrote: > Hi. > > I have a need to do some extra record keeping in progspaces and > objfiles. This patch adds the ability to add random attributes > to objfile and progspace objects using the same mechanism used > for gdb.Fields. > > Regression tested on amd64-linux. > > 2014-10-09 Doug Evans > > * NEWS: Mention ability add attributes to gdb.Objfile and > gdb.Progspace objects. > * python/py-objfile.c (objfile_object): New member dict. > (objfpy_dealloc): Py_XDECREF dict. > (objfpy_initialize): Initialize dict. > (objfile_getset): Add __dict__. > (objfile_object_type): Set tp_dictoffset member. > * python/py-progspace.c (progspace_object): New member dict. > (pspy_dealloc): Py_XDECREF dict. > (pspy_initialize): Initialize dict. > (pspace_getset): Add __dict__. > (pspace_object_type): Set tp_dictoffset member. > > doc/ > * gdb.texinfo (Progspaces In Python): Document ability to add > random attributes to gdb.Progspace objects. > (Objfiles In Python): Document ability to add random attributes to > gdb.objfile objects. > > testsuite/ > * gdb.python/py-objfile.exp: Add tests for setting random attributes > in objfiles. > * gdb.python/py-progspace.exp: Add tests for setting random attributes > in progspaces. Oh, btw, if you're going to try this patch, it depends on https://sourceware.org/ml/gdb-patches/2014-10/msg00206.html