From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH v2 4/4] Document two argument form of gdb.Value constructor
Date: Tue, 19 Feb 2019 21:46:00 -0000 [thread overview]
Message-ID: <20190219144553.4c6d873f@f29-4.lan> (raw)
In-Reply-To: <20190219143356.1576e67f@f29-4.lan>
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/NEWS | 3 +++
gdb/doc/python.texi | 8 ++++++++
2 files changed, 11 insertions(+)
diff --git a/gdb/NEWS b/gdb/NEWS
index eaef6aa384..9ad7ff4885 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/python.texi b/gdb/doc/python.texi
index 2860361c33..7f6f52c4df 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
next prev parent reply other threads:[~2019-02-19 21:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-19 21:34 [PATCH v2 0/4] Define gdb.Value(val, type) constructor Kevin Buettner
2019-02-19 21:39 ` [PATCH v2 1/4] Define unique_ptr specialization for Py_buffer Kevin Buettner
2019-02-19 21:42 ` [PATCH v2 2/4] Define gdb.Value(bufobj, type) constructor Kevin Buettner
2019-02-20 3:43 ` Simon Marchi
2019-02-20 18:03 ` Tom Tromey
2019-02-26 17:34 ` Kevin Buettner
2019-02-19 21:43 ` [PATCH v2 3/4] Add tests for " Kevin Buettner
2019-02-19 21:46 ` Kevin Buettner [this message]
2019-02-20 3:35 ` [PATCH v2 4/4] Document two argument form of gdb.Value constructor Eli Zaretskii
2019-02-26 17:35 ` [PATCH v2 0/4] Define gdb.Value(val, type) constructor Kevin Buettner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190219144553.4c6d873f@f29-4.lan \
--to=kevinb@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).