[v2,3/3] python: Fix erroneous doc about gdb.objfiles()

Message ID 20180913023627.18855-3-simon.marchi@ericsson.com
State New, archived
Headers

Commit Message

Simon Marchi Sept. 13, 2018, 2:36 a.m. UTC
  New in v2: updated the text.

The code implementing gdb.objfiles() returns a list of objfiles for the
current program space (the program space of the selected inferior).  The
documentation for the gdb.objfiles() Python method, however, states:

    Return a sequence of all the objfiles current known to GDB.

That sounds wrong to me.  I tried to phrase to be more precise.

gdb/doc/ChangeLog:

	* python.texi (Objfiles In Python): Update gdb.objfiles() doc.
---
 gdb/doc/python.texi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
  

Comments

Eli Zaretskii Sept. 13, 2018, 1:49 p.m. UTC | #1
> From: Simon Marchi <simon.marchi@ericsson.com>
> CC: Simon Marchi <simon.marchi@ericsson.com>
> Date: Wed, 12 Sep 2018 22:36:27 -0400
> 
> +Return a sequence of objfiles referenced by the current program space.
> +@xref{Objfiles In Python} and @ref{Progspaces In Python}.  This is identical

Please add a comma after the closing brace of @xref.

> +to @code{gdb.selected_inferior().progspace.objfiles()} and is included for
                                                        ^
That brace should be deleted.

OK with those fixed.  Thanks.
  

Patch

diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index 6b3b598039d..9c7d26b133b 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -4112,10 +4112,10 @@  this function returns @code{None}.
 
 @findex gdb.objfiles
 @defun gdb.objfiles ()
-Return a sequence of all the objfiles current known to @value{GDBN}.
-@xref{Objfiles In Python}.  This is identical to
-@code{gdb.selected_inferior().progspace.objfiles()} (@pxref{Progspaces In
-Python}) and is included for historical compatibility.
+Return a sequence of objfiles referenced by the current program space.
+@xref{Objfiles In Python} and @ref{Progspaces In Python}.  This is identical
+to @code{gdb.selected_inferior().progspace.objfiles()} and is included for
+historical compatibility.
 @end defun
 
 @findex gdb.lookup_objfile