This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]