From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26381 invoked by alias); 14 Sep 2018 05:57:40 -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 26339 invoked by uid 89); 14 Sep 2018 05:57:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 14 Sep 2018 05:57:38 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g0h6j-0003Ax-8c for gdb-patches@sourceware.org; Fri, 14 Sep 2018 01:57:36 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53485) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0h6h-0003AE-BC; Fri, 14 Sep 2018 01:57:32 -0400 Received: from [176.228.60.248] (port=1231 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1g0h6b-0003Mn-6d; Fri, 14 Sep 2018 01:57:27 -0400 Date: Fri, 14 Sep 2018 05:57:00 -0000 Message-Id: <83va78k4ee.fsf@gnu.org> From: Eli Zaretskii To: Tom Tromey CC: gdb-patches@sourceware.org In-reply-to: <20180913221627.13772-1-tom@tromey.com> (message from Tom Tromey on Thu, 13 Sep 2018 16:16:27 -0600) Subject: Re: [PATCH v3] Add more methods to gdb.Progspace References: <20180913221627.13772-1-tom@tromey.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-IsSubscribed: yes X-SW-Source: 2018-09/txt/msg00449.txt.bz2 > From: Tom Tromey > Cc: Tom Tromey > Date: Thu, 13 Sep 2018 16:16:27 -0600 > > There are a number of global functions in the gdb Python module which > really should be methods on Progspace. This patch adds new methods to > Progspace and then redefines these globals in terms of these new > methods. > > This version has been rebased on the related changes that Simon > recently put in. > > Built and regtested on x86-64 Fedora 28. > > gdb/ChangeLog > 2018-09-12 Tom Tromey > > * python/lib/gdb/__init__.py (current_progspace, objfiles) > (solib_name, block_for_pc, find_pc_line): New functions. > (execute_unwinders): Update. > * python/py-block.c (gdbpy_block_for_pc): Remove. > * python/py-inferior.c (infpy_get_progspace): New function. > (inferior_object_getset) : Add. > * python/py-progspace.c (pspy_objfiles): Rewrite. > (pspy_solib_name, pspy_block_for_pc) > (pspy_find_pc_line, pspy_is_valid): New functions. > (progspace_object_methods): Add entries for solib_name, > block_for_pc, find_pc_line, is_valid. > * python/python-internal.h (gdbpy_block_for_pc) > (build_objfiles_list): Don't declare. > * python/python.c: Don't include solib.h. > (gdbpy_solib_name, gdbpy_find_pc_line) > (gdbpy_get_current_progspace, build_objfiles_list) > (gdbpy_objfiles): Remove. > (GdbMethods) solib_name, find_pc_line>: Remove entries. > > gdb/doc/ChangeLog > 2018-09-13 Tom Tromey > > * python.texi (Basic Python): Update docs for find_pc_line, > solib_name. > (Progspaces In Python): Update docs for current_progspace. > Document block_for_pc, find_pc_line, is_valid, nsolib_name. > Move method documentation before example. OK for the gdb.texinfo part. Thanks.