diff options
author | Tom Tromey <tromey@adacore.com> | 2023-05-12 14:10:56 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-06-12 12:09:39 -0600 |
commit | ed80156930339ee8e68a5341ec3d7f06fab6d02c (patch) | |
tree | bdd755fa885877422eba4b84b7c0b7fa9714d7cf /gdb/doc | |
parent | 510586589e74f2ff27f4c563daa395a22c68501c (diff) | |
download | gdb-ed80156930339ee8e68a5341ec3d7f06fab6d02c.zip gdb-ed80156930339ee8e68a5341ec3d7f06fab6d02c.tar.gz gdb-ed80156930339ee8e68a5341ec3d7f06fab6d02c.tar.bz2 |
Add gdb.Value.assign method
This adds an 'assign' method to gdb.Value. This allows for assignment
without requiring the use of parse_and_eval.
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/python.texi | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi index 02cb9ad..efef4de 100644 --- a/gdb/doc/python.texi +++ b/gdb/doc/python.texi @@ -947,6 +947,12 @@ If @var{type} is @code{None} then this version of @code{__init__} behaves as though @var{type} was not passed at all. @end defun +@defun Value.assign (rhs) +Assign @var{rhs} to this value, and return @code{None}. If this value +cannot be assigned to, or if the assignment is invalid for some reason +(for example a type-checking failure), an exception will be thrown. +@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 |