+2018-10-06 Tom Tromey <tom@tromey.com>
+
+ PR python/21765:
+ * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
+ SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
+ SYMBOL_TYPES_DOMAIN. Define SYMBOL_MODULE_DOMAIN,
+ SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
+
2018-10-06 Tom Tromey <tom@tromey.com>
PR build/17077:
** The gdb.Progspace type has a new 'objfiles' method, which returns the list
of objfiles associated to that program space.
+ ** gdb.SYMBOL_LOC_COMMON_BLOCK, gdb.SYMBOL_MODULE_DOMAIN, and
+ gdb.SYMBOL_COMMON_BLOCK_DOMAIN were added to reflect changes to
+ the gdb core.
+
+ ** gdb.SYMBOL_VARIABLES_DOMAIN, gdb.SYMBOL_FUNCTIONS_DOMAIN, and
+ gdb.SYMBOL_TYPES_DOMAIN are now deprecated. These were never
+ correct and did not work properly.
+
* Configure changes
--enable-ubsan
+2018-10-06 Tom Tromey <tom@tromey.com>
+
+ PR python/21765:
+ * python.texi (Symbols In Python): Document the module and
+ common-block domains. Remove documentation for incorrect
+ domains.
+
2018-10-03 Tom Tromey <tom@tromey.com>
* gdb.texinfo (Configure Options): Document --enable-ubsan.
@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_TYPES_DOMAIN
-@item gdb.SYMBOL_TYPES_DOMAIN
-This domain contains all types.
+@vindex SYMBOL_MODULE_DOMAIN
+@item gdb.SYMBOL_MODULE_DOMAIN
+This domain contains names of Fortran module 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
@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
LOC_OPTIMIZED_OUT) < 0
|| PyModule_AddIntConstant (gdb_module, "SYMBOL_LOC_COMPUTED",
LOC_COMPUTED) < 0
+ || PyModule_AddIntConstant (gdb_module, "SYMBOL_LOC_COMMON_BLOCK",
+ LOC_COMMON_BLOCK) < 0
|| PyModule_AddIntConstant (gdb_module, "SYMBOL_LOC_REGPARM_ADDR",
LOC_REGPARM_ADDR) < 0
|| PyModule_AddIntConstant (gdb_module, "SYMBOL_UNDEF_DOMAIN",
VAR_DOMAIN) < 0
|| PyModule_AddIntConstant (gdb_module, "SYMBOL_STRUCT_DOMAIN",
STRUCT_DOMAIN) < 0
- || PyModule_AddIntConstant (gdb_module, "SYMBOL_LABEL_DOMAIN",
- LABEL_DOMAIN) < 0
- || PyModule_AddIntConstant (gdb_module, "SYMBOL_VARIABLES_DOMAIN",
- VARIABLES_DOMAIN) < 0
+ || PyModule_AddIntConstant (gdb_module, "SYMBOL_MODULE_DOMAIN",
+ MODULE_DOMAIN) < 0
+ || PyModule_AddIntConstant (gdb_module, "SYMBOL_COMMON_BLOCK_DOMAIN",
+ COMMON_BLOCK_DOMAIN) < 0)
+ return -1;
+
+ /* These remain defined for compatibility, but as they were never
+ correct, they are no longer documented. Eventually we can remove
+ them. These exist because at one time, enum search_domain and
+ enum domain_enum_tag were combined -- but different values were
+ used differently. Here we try to give them values that will make
+ sense if they are passed to gdb.lookup_symbol. */
+ if (PyModule_AddIntConstant (gdb_module, "SYMBOL_VARIABLES_DOMAIN",
+ VAR_DOMAIN) < 0
|| PyModule_AddIntConstant (gdb_module, "SYMBOL_FUNCTIONS_DOMAIN",
- FUNCTIONS_DOMAIN) < 0
+ VAR_DOMAIN) < 0
|| PyModule_AddIntConstant (gdb_module, "SYMBOL_TYPES_DOMAIN",
- TYPES_DOMAIN) < 0)
+ VAR_DOMAIN) < 0)
return -1;
return gdb_pymodule_addobject (gdb_module, "Symbol",