From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 33045 invoked by alias); 8 Feb 2016 15:51:32 -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 32218 invoked by uid 89); 8 Feb 2016 15:51:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=(unknown), MESSAGE, HContent-Transfer-Encoding:8bit X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Mon, 08 Feb 2016 15:51:30 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 2DD74AB02; Mon, 8 Feb 2016 15:51:25 +0000 (UTC) Subject: Re: [PATCH 6/7] py-minsymbol: Add interface to access minimal_symbols To: Phil Muldoon , gdb-patches@sourceware.org References: <1454606973-31017-1-git-send-email-jeffm@suse.com> <1454606973-31017-7-git-send-email-jeffm@suse.com> <56B4D145.4050700@redhat.com> From: Jeff Mahoney X-Enigmail-Draft-Status: N1110 Message-ID: <56B8B97C.3020908@suse.com> Date: Mon, 08 Feb 2016 15:51:00 -0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <56B4D145.4050700@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2016-02/txt/msg00195.txt.bz2 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2/5/16 11:43 AM, Phil Muldoon wrote: > On 04/02/16 17:29, jeffm@suse.com wrote: >> From: Jeff Mahoney >> >> This patch adds a new gdb.MinSymbol object to export the >> minimal_symbol interface. These objects can be resolved using a >> new gdb.lookup_minimal_symbol call. --- +static PyObject * >> +msympy_get_file_name (PyObject *self, void *closure) +{ + >> struct minimal_symbol *minsym = NULL; + + MSYMPY_REQUIRE_VALID >> (self, minsym); + + return PyString_FromString >> (minsym->filename); +} In writing the test cases, I discovered that this value usually (but not always) has a value but the value tends to be meaningless or at least compiler dependent. In my test program, it dumps asm("...") code into crtstuff.c. I tried using an assembly file instead (with generic pseudoinstructions and labels) and it presented an empty filename. When I load up the kernel, it puts every minimal symbol in csum-wrappers_64.c (at least for this kernel build). Given the questionable utility of this value, should I even keep it? [Removed other details for review; I have addressed them in each patch.] > The patch series, in principle, looks fine to me other than the > nits I've highlighted. > > However it needs tests for the new functionality. It would be > helpful if you could indicate if you have run the testsuite and > checked for regressions. > > It also needs documentation additions and changes, and a > documentation review. > > Also please wait for a maintainer to sign off on it, too Thanks for the review. I've added tests and documentation for all but regcache (which I'm about to do) and it already sussed out several bugs. I ended up having to rework the gdb.lookup_symbol for static symbols patch significantly since it did introduce regressions. It's a lot simpler now. I'll post the updated set once I finish up regcache. - -Jeff - -- Jeff Mahoney SUSE Labs -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.19 (Darwin) Comment: GPGTools - http://gpgtools.org iQIcBAEBAgAGBQJWuLl7AAoJEB57S2MheeWySVsQAICvXs3bfkMCTXa6pnWHra+z s+tKiyC6gjOX2U2bDzZq3uxSdbArtB3Rgl4TTRs3BFAAOdVLwsMw0jCEZjaNZQO1 D0qwErfrD0E7RF+YKKslako8+Au+yAMcqlQt97XnQFURSLHQ3Dp/jGyRRH9qSXo4 kFatHeKUlhX8gV2nkc7xwKTddxGnUSSHCb02UWcZOZ7Mjaa4ORVpvmWTHp5KdLWJ S4AGzR4G/JB90ew31aZriAFqQbQTHMcauOhoMSktLobAMsVRX/zX6/CLXNntOPoT tI8YK834H+DMGJVYzqOx9uqaxtTo8E84IMVMG4X1XIkgd1au4qQeuEyyfGdwfE0Z Iun5rgCVaGtg8VxCB66jfDloImlfYbwZgGnN/+oWHlhTHurko5ma7xgV/mDgoUUw J0v/m0yZ8pmMYtVSK2eWBcrKQcqdoKRa+XGqwa69/vWTwD0LnxUA8tphA61XOn3m x26tHsokAXGmXy+RBrCMYa+ABehBcB5AQFZYxTHCPFF5qJlJs5MYT29+HdxsS71N A/iHoJWaPPiM8FqmqLGexnS1rxClwd4DK7hiwq43b5gbfw4axXPp3l6AC1nQ++4M ZPHz18KmlVRkgiNcAxMXwMCxGW04cbWkD/VrhnMk8TnNWYDWZyabIAXJnKTeJKIU 0Qox9ZHBecYHXtL0ADCu =1A6j -----END PGP SIGNATURE-----