Document two argument form of gdb.Value constructor
authorKevin Buettner <kevinb@redhat.com>
Sun, 17 Feb 2019 01:31:51 +0000 (18:31 -0700)
committerKevin Buettner <kevinb@redhat.com>
Tue, 26 Feb 2019 17:28:05 +0000 (10:28 -0700)
gdb/ChangeLog:

* NEWS: Mention two argument form of gdb.Value constructor.

gdb/doc/ChangeLog:

* python.texi (Values From Inferior): Document second form
of Value.__init__.

gdb/ChangeLog
gdb/NEWS
gdb/doc/ChangeLog
gdb/doc/python.texi

index 5d845e9a214b2c7d5b0531b61c7133b834e0da43..df94e7514b9ebe6487e4a9beced9973e1a9168b8 100644 (file)
@@ -1,5 +1,6 @@
 2019-02-26  Kevin Buettner  <kevinb@redhat.com>
 
+       * NEWS: Mention two argument form of gdb.Value constructor.
        * python/py-value.c (convert_buffer_and_type_to_value): New
        function.
        (valpy_new): Parse arguments via gdb_PyArg_ParseTupleAndKeywords.
index 8fe961b3f37a39fae7376b631e3971bea7856bc9..bfb023e7bb57e3537967a657d4e6f9b0091af2c0 100644 (file)
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -202,6 +202,9 @@ FreeBSD/riscv                       riscv*-*-freebsd*
      gdb.SYMBOL_TYPES_DOMAIN are now deprecated.  These were never
      correct and did not work properly.
 
+  ** The gdb.Value type has a new constructor, which is used to construct a
+     gdb.Value from a Python buffer object and a gdb.Type.
+
 * Configure changes
 
 --enable-ubsan
index fb970e98d190ec55ac7a1ad4ced0161547e4fca2..7a1add5f19c27601739071fef26eb2da27df8b97 100644 (file)
@@ -1,3 +1,8 @@
+2019-02-26  Kevin Buettner  <kevinb@redhat.com>
+
+       * python.texi (Values From Inferior): Document second form
+       of Value.__init__.
+
 2019-02-23  Joel Brobecker  <brobecker@adacore.com>
 
        * gdb.texinfo: Update copyright year ranges.
index 2860361c333ed7c51037a53482739c6a138bf2fd..7f6f52c4df62914ddc78e8f88dbe1b25c9b0a32e 100644 (file)
@@ -735,6 +735,14 @@ 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
+@code{gdb.Value} of type @var{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}.
+@end defun
+
 @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
This page took 0.036303 seconds and 4 git commands to generate.