[Bug rust/21763] gdb.lookup_type fails for rust

tromey at sourceware dot org sourceware-bugzilla@sourceware.org
Wed Jul 12 22:59:00 GMT 2017


https://sourceware.org/bugzilla/show_bug.cgi?id=21763

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
The issue seems to be that lookup_typename looks in VAR_DOMAIN,
but the symbol in question is in STRUCT_DOMAIN.

Two possible fixes come to mind.

One is to attempt to put all Rust types into VAR_DOMAIN.
This arguably even makes sense because VAR_DOMAIN is defined
as holding typedefs (which seems weird -- having a real
"types" domain might be preferable, but much harder).
This change could probably be done just in dwarf2read.c,
though patching rust_lookup_type would be good to do as well.
It's unclear what other issues this might introduce.

The second possible fix is to have typy_lookup_typename
also search STRUCT_DOMAIN if the VAR_DOMAIN search fails.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list