This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Document two argument form of gdb.Value constructor


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=af54ade989cbbb1a43f4bc9d4d2e8e60814306f1

commit af54ade989cbbb1a43f4bc9d4d2e8e60814306f1
Author: Kevin Buettner <kevinb@redhat.com>
Date:   Sat Feb 16 18:31:51 2019 -0700

    Document two argument form of gdb.Value constructor
    
    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__.

Diff:
---
 gdb/ChangeLog       | 1 +
 gdb/NEWS            | 3 +++
 gdb/doc/ChangeLog   | 5 +++++
 gdb/doc/python.texi | 8 ++++++++
 4 files changed, 17 insertions(+)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5d845e9..df94e75 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/NEWS b/gdb/NEWS
index 8fe961b..bfb023e 100644
--- 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
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index fb970e9..7a1add5 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -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.
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index 2860361..7f6f52c 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]