Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[gdb/symtab] Fix qualified name for cooked index dump
While looking at the cooked index entry for local variable l4 of function test in test-case gdb.fortran/logical.exp: ... $ gdb -q -batch outputs/gdb.fortran/logical/logical \ -ex "maint print objfiles" ... [9] ((cooked_index_entry *) 0x7fc6e0003010) name: l4 canonical: l4 qualified: l4 DWARF tag: DW_TAG_variable flags: 0x2 [IS_STATIC] DIE offset: 0x17c parent: ((cooked_index_entry *) 0x7fc6e0002f20) [test] ... I noticed that while the entry does have a parent, that's not reflected in the qualified name. This makes it harder to write test-cases that check the parent of a cooked index entry. This is due to the implementation of full_name, which skips printing parents if the language does not specify an appropriate separator. Fix this by using "::" as default separator, getting us instead: ... [9] ((cooked_index_entry *) 0x7f94ec0040c0) name: l4 canonical: l4 qualified: test::l4 DWARF tag: DW_TAG_variable flags: 0x2 [IS_STATIC] DIE offset: 0x17c parent: ((cooked_index_entry *) 0x7f94ec003fd0) [test] ... Tested on x86_64-linux. Approved-By: Tom Tromey <[email protected]>
- Loading branch information