aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorPhil Muldoon <pmuldoon@redhat.com>2011-03-17 09:36:17 +0000
committerPhil Muldoon <pmuldoon@redhat.com>2011-03-17 09:36:17 +0000
commit29703da4b1a5b80034c3f33b0c8f34ce6e1f08d5 (patch)
treec0999d1a168f21196c3c8ba5b1401f05b00236d3 /gdb/doc
parenta6363bfc3832f13436cb744783aa96eaec972006 (diff)
downloadgdb-29703da4b1a5b80034c3f33b0c8f34ce6e1f08d5.zip
gdb-29703da4b1a5b80034c3f33b0c8f34ce6e1f08d5.tar.gz
gdb-29703da4b1a5b80034c3f33b0c8f34ce6e1f08d5.tar.bz2
2011-03-17 Phil Muldoon <pmuldoon@redhat.com>
* python/py-symtab.c: Populate symtab_object_methods, sal_object_methods. (stpy_is_valid): New function. (salpy_is_valid): Ditto. * python/py-symbol.c: Declare symbol_object_methods. Populate. (sympy_is_valid): New function. * python/py-objfile.c: Declare objfile_object_methods. Populate. (objfpy_is_valid): New function. * python/py-inferior.c: Populate inferior_object_methods. (infpy_is_valid): New function. * python/py-infthread.c: Populate thread_object_methods. (thpy_is_valid): New function. * python/py-block.c: Declare block_object_methods. Populate. Declare block_iterator_object_methods. Populate. (blpy_is_valid): New function. (blpy_iter_is_valid): Ditto. 2010-03-17 Phil Muldoon <pmuldoon@redhat.com> * gdb.python/Makefile.in: Add py-objfile. * gdb.python/py-objfile.exp: New file. * gdb.python/py-objfile.c: New file. * gdb.python/py-block.exp: Add is_valid tests. * gdb.python/py-inferior.exp: Ditto. * gdb.python/py-infthread.exp: Ditto. * gdb.python/py-symbol.exp: Ditto. * gdb.python/py-symtab.exp: Ditto. 2011-03-17 Phil Muldoon <pmuldoon@redhat.com> * gdb.texinfo (Blocks In Python): Add is_valid method description. (Inferiors In Python): Likewise. (Threads In Python): Likewise. (Symbols In Python): Likewise. (Objfiles In Python): Likewise. (Symbol Tables In Python): Likewise.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog10
-rw-r--r--gdb/doc/gdb.texinfo75
2 files changed, 83 insertions, 2 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index b7f63eb..658325e 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,12 @@
+2011-03-17 Phil Muldoon <pmuldoon@redhat.com>
+
+ * gdb.texinfo (Blocks In Python): Add is_valid method description.
+ (Inferiors In Python): Likewise.
+ (Threads In Python): Likewise.
+ (Symbols In Python): Likewise.
+ (Objfiles In Python): Likewise.
+ (Symbol Tables In Python): Likewise.
+
2011-03-15 Pedro Alves <pedro@codesourcery.com>
* gdb.texinfo (Auto Display) <undisplay, enable display, disable
@@ -8,7 +17,6 @@
* gdb.texinfo (Breakpoints In Python): Add description and example
of Python stop function operation.
-
2011-03-10 Phil Muldoon <pmuldoon@redhat.com>
* gdb.texinfo (Parameters In Python): Document get_set_string and
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 0eeb38c..ea1e2f5 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -21870,6 +21870,14 @@ started by @value{GDBN} itself.
A @code{gdb.Inferior} object has the following methods:
@table @code
+@defmethod Inferior is_valid
+Returns @code{True} if the @code{gdb.Inferior} object is valid,
+@code{False} if not. A @code{gdb.Inferior} object will become invalid
+if the inferior no longer exists within @value{GDBN}. All other
+@code{gdb.Inferior} methods will throw an exception if it is invalid
+at the time the method is called.
+@end defmethod
+
@defmethod Inferior threads
This method returns a tuple holding all the threads which are valid
when it is called. If there are no valid threads, the method will
@@ -22069,6 +22077,14 @@ does not use that identifier.
A @code{gdb.InferiorThread} object has the following methods:
@table @code
+@defmethod InferiorThread is_valid
+Returns @code{True} if the @code{gdb.InferiorThread} object is valid,
+@code{False} if not. A @code{gdb.InferiorThread} object will become
+invalid if the thread exits, or the inferior that the thread belongs
+is deleted. All other @code{gdb.InferiorThread} methods will throw an
+exception if it is invalid at the time the method is called.
+@end defmethod
+
@defmethod InferiorThread switch
This changes @value{GDBN}'s currently selected thread to the one represented
by this object.
@@ -22662,6 +22678,16 @@ which is used to format the value. @xref{Pretty Printing API}, for more
information.
@end defivar
+A @code{gdb.Objfile} object has the following methods:
+
+@defmethod Objfile is_valid
+Returns @code{True} if the @code{gdb.Objfile} object is valid,
+@code{False} if not. A @code{gdb.Objfile} object can become invalid
+if the object file it refers to is not loaded in @value{GDBN} any
+longer. All other @code{gdb.Objfile} methods will throw an exception
+if it is invalid at the time the method is called.
+@end defmethod
+
@node Frames In Python
@subsubsection Accessing inferior stack frames from Python.
@@ -22813,6 +22839,20 @@ block cannot be found for the @var{pc} value specified, the function
will return @code{None}.
@end defun
+A @code{gdb.Block} object has the following methods:
+
+@table @code
+@defmethod Block is_valid
+Returns @code{True} if the @code{gdb.Block} object is valid,
+@code{False} if not. A block object can become invalid if the block it
+refers to doesn't exist anymore in the inferior. All other
+@code{gdb.Block} methods will throw an exception if it is invalid at
+the time the method is called. This method is also made available to
+the Python iterator object that @code{gdb.Block} provides in an iteration
+context and via the Python @code{iter} built-in function.
+@end defmethod
+@end table
+
A @code{gdb.Block} object has the following attributes:
@table @code
@@ -22935,6 +22975,18 @@ of a symbol. Each address class is a constant defined in the
@end defivar
@end table
+A @code{gdb.Symbol} object has the following methods:
+
+@table @code
+@defmethod Symbol is_valid
+Returns @code{True} if the @code{gdb.Symbol} object is valid,
+@code{False} if not. A @code{gdb.Symbol} object can become invalid if
+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 defmethod
+@end table
+
The available domain categories in @code{gdb.Symbol} are represented
as constants in the @code{gdb} module:
@@ -23079,6 +23131,19 @@ attribute is not writable.
@end defivar
@end table
+A @code{gdb.Symtab_and_line} object has the following methods:
+
+@table @code
+@defmethod Symtab_and_line is_valid
+Returns @code{True} if the @code{gdb.Symtab_and_line} object is valid,
+@code{False} if not. A @code{gdb.Symtab_and_line} object can become
+invalid if the Symbol table and line object it refers to does not
+exist in @value{GDBN} any longer. All other
+@code{gdb.Symtab_and_line} methods will throw an exception if it is
+invalid at the time the method is called.
+@end defmethod
+@end table
+
A @code{gdb.Symtab} object has the following attributes:
@table @code
@@ -23092,9 +23157,17 @@ This attribute is not writable.
@end defivar
@end table
-The following methods are provided:
+A @code{gdb.Symtab} object has the following methods:
@table @code
+@defmethod Symtab is_valid
+Returns @code{True} if the @code{gdb.Symtab} object is valid,
+@code{False} if not. A @code{gdb.Symtab} object can become invalid if
+the symbol table it refers to does not exist in @value{GDBN} any
+longer. All other @code{gdb.Symtab} methods will throw an exception
+if it is invalid at the time the method is called.
+@end defmethod
+
@defmethod Symtab fullname
Return the symbol table's source absolute file name.
@end defmethod