aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorSiva Chandra <sivachandra@chromium.org>2015-04-25 07:04:40 -0700
committerSiva Chandra <sivachandra@chromium.org>2015-05-09 17:30:35 -0700
commit4c082a81dfebcca45e4ee8cb90490ab733b8e017 (patch)
tree824873fd9d879d57492bde01f990cc36f0f454dd /gdb/doc
parent10a52f094ebbbed3f9d1b28a2ded94e43d500133 (diff)
downloadgdb-4c082a81dfebcca45e4ee8cb90490ab733b8e017.zip
gdb-4c082a81dfebcca45e4ee8cb90490ab733b8e017.tar.gz
gdb-4c082a81dfebcca45e4ee8cb90490ab733b8e017.tar.bz2
[Python] Add methods reference_value and const_value to gdb.Value.
gdb/ChangeLog: * NEWS (Python Scripting): Mention the new gdb.Value methods. * python/py-value.c (valpy_reference_value): New function. (valpy_const_value): Likewise. (value_object_methods): Add new methods. * value.c (make_cv_value): New function. * value.h (make_cv_value): Declare. gdb/doc/ChangeLog: * python.texi (Values From Inferior): Add descriptions of new methods gdb.Value.reference_value and gdb.Value.const_value. gdb/testsuite/ChangeLog: * gdb.python/py-xmethods.cc: Enhance test case. * gdb.python/py-xmethods.exp: New tests. * gdb.python/py-xmethods.py (A_indexoper): New xmethod worker function. (B_indexoper): Likewise. (global_dm_list) : Add new xmethod worker functions.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog5
-rw-r--r--gdb/doc/python.texi10
2 files changed, 15 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index f374fea..727d0ad 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,8 @@
+2015-05-09 Siva Chandra Reddy <sivachandra@google.com>
+
+ * python.texi (Values From Inferior): Add descriptions of new
+ methods gdb.Value.reference_value and gdb.Value.const_value.
+
2015-05-06 Joel Brobecker <brobecker@adacore.com>
* gdb.texinfo (Files): Add "info dll" documentation.
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index fc3c745..57ec22e 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -781,6 +781,16 @@ The @code{gdb.Value} object @code{py_val} is identical to that
corresponding to @code{val}.
@end defun
+@defun Value.reference_value ()
+Return a @code{gdb.Value} object which is a reference to the value
+encapsulated by this instance.
+@end defun
+
+@defun Value.const_value ()
+Return a @code{gdb.Value} object which is a @code{const} version of the
+value encapsulated by this instance.
+@end defun
+
@defun Value.dynamic_cast (type)
Like @code{Value.cast}, but works as if the C@t{++} @code{dynamic_cast}
operator were used. Consult a C@t{++} reference for details.