This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v3] Add more methods to gdb.Progspace
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Tom Tromey <tom at tromey dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 14 Sep 2018 08:57:13 +0300
- Subject: Re: [PATCH v3] Add more methods to gdb.Progspace
- References: <20180913221627.13772-1-tom@tromey.com>
> From: Tom Tromey <tom@tromey.com>
> Cc: Tom Tromey <tom@tromey.com>
> 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 <tom@tromey.com>
>
> * 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) <progspace>: 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) <current_progspace, objfiles, block_for_pc,
> solib_name, find_pc_line>: Remove entries.
>
> gdb/doc/ChangeLog
> 2018-09-13 Tom Tromey <tom@tromey.com>
>
> * 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.