Discussion:
[Bug python/21765] New: gdb.SYMBOL_TYPES_DOMAIN leads to wrong behavior
tromey at sourceware dot org
2017-07-12 23:01:21 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=21765

Bug ID: 21765
Summary: gdb.SYMBOL_TYPES_DOMAIN leads to wrong behavior
Product: gdb
Version: unknown
Status: NEW
Severity: normal
Priority: P2
Component: python
Assignee: unassigned at sourceware dot org
Reporter: tromey at sourceware dot org
Target Milestone: ---

Python defines this:

|| PyModule_AddIntConstant (gdb_module, "SYMBOL_TYPES_DOMAIN",
TYPES_DOMAIN) < 0)

... however if this is actually passed to gdb.lookup_symbol
(as seemingly recommended in the docs), the result will not do
what the user might expect, as TYPES_DOMAIN isn't a constant
in domain_enum, but rather in search_domain.

This applies to SYMBOL_VARIABLES_DOMAIN and SYMBOL_FUNCTIONS_DOMAIN
as well.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-15 13:14:35 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=21765

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at sourceware dot org |tromey at sourceware dot org
--
You are receiving this mail because:
You are on the CC list for the bug.
cvs-commit at gcc dot gnu.org
2018-10-07 05:22:36 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=21765

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <***@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=51e78fc5fa21870d415c52f90b93e3c6ad57be46

commit 51e78fc5fa21870d415c52f90b93e3c6ad57be46
Author: Tom Tromey <***@tromey.com>
Date: Sat Oct 6 22:55:19 2018 -0600

Update symbol domain and location values for Python

In the distant past, there was no distinction between domain_enum and
search_domain. At that point, there were two sets of enumerators in a
single enum -- which is why these were eventually split. This
confusion leaked out to the Python API as well, as noted in
PR python/21765.

This patch deprecates the constants that aren't useful to the Python
API. They are left in place for now, but removed from the
documentation. Also, their values are changed so that, if used, they
might work. Finally, missing domains and location constants are
added.

gdb/ChangeLog
2018-10-06 Tom Tromey <***@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.

gdb/doc/ChangeLog
2018-10-06 Tom Tromey <***@tromey.com>

PR python/21765:
* python.texi (Symbols In Python): Document the module and
common-block domains. Remove documentation for incorrect
domains.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-10-07 05:33:36 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=21765

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |8.3

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
Fixed
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...