[4/4] Document two argument form of gdb.Value constructor

Message ID 20190218080907.06fd65af@f29-4.lan
State New, archived
Headers

Commit Message

Kevin Buettner Feb. 18, 2019, 3:09 p.m. UTC
  gdb/doc/ChangeLog:
    
            * python.texi (Values From Inferior): Document second form
            of Value.__init__.
---
 gdb/doc/python.texi | 7 +++++++
 1 file changed, 7 insertions(+)
  

Comments

Eli Zaretskii Feb. 18, 2019, 4:13 p.m. UTC | #1
> Date: Mon, 18 Feb 2019 08:09:07 -0700
> From: Kevin Buettner <kevinb@redhat.com>
> 
> +@defun Value.__init__ (@var{val}, @r{[}, type @r{]})
> +This second form of the @code{gdb.Value} constructor returns a gdb
> +value of type @{type} where the value contents are taken from the

"gdb value" should be "@code{gdb.value}", right?

> +python buffer object specified by @var{val}.  The number of bytes in
> +the python buffer object must be greater than or equal to the size of
> +@var{type}.

I think elsewhere we capitalize Python.

OK with those two fixed.

Thanks.

P.S. Does this warrant a NEWS entry?
  

Patch

diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index 2860361c33..f6df32e76d 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -735,6 +735,13 @@  its result is used.
 @end table
 @end defun
 
+@defun Value.__init__ (@var{val}, @r{[}, type @r{]})
+This second form of the @code{gdb.Value} constructor returns a gdb
+value of type @{type} where the value contents are taken from the
+python buffer object specified by @var{val}.  The number of bytes in
+the python buffer object must be greater than or equal to the size of
+@var{type}.
+
 @defun Value.cast (type)
 Return a new instance of @code{gdb.Value} that is the result of
 casting this instance to the type described by @var{type}, which must