X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fdoc%2Fpython.texi;h=2860361c333ed7c51037a53482739c6a138bf2fd;hb=2d8b68309f4a4292c27ccfd598bb01b8f6e5c4b1;hp=e98178a1216c8e4668f78a3946d02f82bf55cf4c;hpb=8743a9cdd20055e02a20c24c37b5312e3e626691;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi index e98178a121..2860361c33 100644 --- a/gdb/doc/python.texi +++ b/gdb/doc/python.texi @@ -1,4 +1,4 @@ -@c Copyright (C) 2008-2018 Free Software Foundation, Inc. +@c Copyright (C) 2008-2019 Free Software Foundation, Inc. @c Permission is granted to copy, distribute and/or modify this document @c under the terms of the GNU Free Documentation License, Version 1.3 or @c any later version published by the Free Software Foundation; with the @@ -2860,6 +2860,14 @@ when it is called. If there are no valid threads, the method will return an empty tuple. @end defun +@defun Inferior.architecture () +Return the @code{gdb.Architecture} (@pxref{Architectures In Python}) +for this inferior. This represents the architecture of the inferior +as a whole. Some platforms can have multiple architectures in a +single address space, so this may not match the architecture of a +particular frame (@pxref{Frames In Python}). +@end defun + @findex Inferior.read_memory @defun Inferior.read_memory (address, length) Read @var{length} addressable memory units from the inferior, starting at @@ -3828,6 +3836,30 @@ example, @kbd{set foo off}). The @code{value} attribute has already been populated with the new value and may be used in output. This method must return a string. If the returned string is not empty, @value{GDBN} will present it to the user. + +If this method raises the @code{gdb.GdbError} exception +(@pxref{Exception Handling}), then @value{GDBN} will print the +exception's string and the @code{set} command will fail. Note, +however, that the @code{value} attribute will not be reset in this +case. So, if your parameter must validate values, it should store the +old value internally and reset the exposed value, like so: + +@smallexample +class ExampleParam (gdb.Parameter): + def __init__ (self, name): + super (ExampleParam, self).__init__ (name, + gdb.COMMAND_DATA, + gdb.PARAM_BOOLEAN) + self.value = True + self.saved_value = True + def validate(self): + return False + def get_set_string (self): + if not self.validate(): + self.value = self.saved_value + raise gdb.GdbError('Failed to validate') + self.saved_value = self.value +@end smallexample @end defun @defun Parameter.get_show_string (self, svalue) @@ -4770,18 +4802,13 @@ This domain holds struct, union and enum type names. @item gdb.SYMBOL_LABEL_DOMAIN This domain contains names of labels (for gotos). -@vindex SYMBOL_VARIABLES_DOMAIN -@item gdb.SYMBOL_VARIABLES_DOMAIN -This domain holds a subset of the @code{SYMBOLS_VAR_DOMAIN}; it -contains everything minus functions and types. - -@vindex SYMBOL_FUNCTIONS_DOMAIN -@item gdb.SYMBOL_FUNCTIONS_DOMAIN -This domain contains all functions. +@vindex SYMBOL_MODULE_DOMAIN +@item gdb.SYMBOL_MODULE_DOMAIN +This domain contains names of Fortran module types. -@vindex SYMBOL_TYPES_DOMAIN -@item gdb.SYMBOL_TYPES_DOMAIN -This domain contains all types. +@vindex SYMBOL_COMMON_BLOCK_DOMAIN +@item gdb.SYMBOL_COMMON_BLOCK_DOMAIN +This domain contains names of Fortran common blocks. @end vtable The available address class categories in @code{gdb.Symbol} are represented @@ -4852,6 +4879,11 @@ The value does not actually exist in the program. @vindex SYMBOL_LOC_COMPUTED @item gdb.SYMBOL_LOC_COMPUTED The value's address is a computed location. + +@vindex SYMBOL_LOC_COMPUTED +@item gdb.SYMBOL_LOC_COMPUTED +The value's address is a symbol. This is only used for Fortran common +blocks. @end vtable @node Symbol Tables In Python