aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-02-07 19:47:16 +0000
committerTom Tromey <tromey@redhat.com>2012-02-07 19:47:16 +0000
commitf0823d2ce8e4cb8b64176872a372d8147804fb10 (patch)
treefb7552f824929309c2b65a6b54b656e90066885a /gdb/doc
parent64e7d9dddc00228cdbcecdd4c053cf83cf6608b7 (diff)
downloadgdb-f0823d2ce8e4cb8b64176872a372d8147804fb10.zip
gdb-f0823d2ce8e4cb8b64176872a372d8147804fb10.tar.gz
gdb-f0823d2ce8e4cb8b64176872a372d8147804fb10.tar.bz2
PR python/12027:
* python/python-internal.h (frame_object_type): Declare. * python/py-symbol.c (sympy_needs_frame): New function. (sympy_value): New function. (symbol_object_getset): Add "needs_frame". (symbol_object_methods): Add "value". * python/py-frame.c (frame_object_type): No longer static. gdb/doc * gdb.texinfo (Symbols In Python): Document Symbol.needs_frame and Symbol.value. gdb/testsuite * gdb.python/py-symbol.exp: Test Symbol.needs_frame and Symbol.value. * gdb.python/py-symbol.c (qq): Set default value.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog5
-rw-r--r--gdb/doc/gdb.texinfo14
2 files changed, 19 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 8dd113e..19b61be 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,5 +1,10 @@
2012-02-07 Tom Tromey <tromey@redhat.com>
+ * gdb.texinfo (Symbols In Python): Document Symbol.needs_frame and
+ Symbol.value.
+
+2012-02-07 Tom Tromey <tromey@redhat.com>
+
* gdb.texinfo (Symbols In Python): Document Symbol.line.
2012-01-27 Thomas Schwinge <thomas@codesourcery.com>
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 052820b..02beed7 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -23993,6 +23993,11 @@ of a symbol. Each address class is a constant defined in the
@code{gdb} module and described later in this chapter.
@end defvar
+@defvar Symbol.needs_frame
+This is @code{True} if evaluating this symbol's value requires a frame
+(@pxref{Frames In Python}) and @code{False} otherwise. Typically,
+local variables will require a frame, but other symbols will not.
+
@defvar Symbol.is_argument
@code{True} if the symbol is an argument of a function.
@end defvar
@@ -24020,6 +24025,15 @@ the symbol it refers to does not exist in @value{GDBN} any longer.
All other @code{gdb.Symbol} methods will throw an exception if it is
invalid at the time the method is called.
@end defun
+
+@defun Symbol.value (@r{[}frame@r{]})
+Compute the value of the symbol, as a @code{gdb.Value}. For
+functions, this computes the address of the function, cast to the
+appropriate type. If the symbol requires a frame in order to compute
+its value, then @var{frame} must be given. If @var{frame} is not
+given, or if @var{frame} is invalid, then this method will throw an
+exception.
+@end defun
@end table
The available domain categories in @code{gdb.Symbol} are represented