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/23625] New: rust ptype is incorrect for pointer types


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

            Bug ID: 23625
           Summary: rust ptype is incorrect for pointer types
           Product: gdb
           Version: 8.2
            Status: NEW
          Severity: normal
          Priority: P2
         Component: rust
          Assignee: unassigned at sourceware dot org
          Reporter: tromey at sourceware dot org
  Target Milestone: ---

If you run the test case from gdb.rust/traits.exp and ptype, you
will see:

(gdb) ptype td
type = struct traits::&T {
  pointer: u8 *,
  vtable: usize (*,
}


The type of "vtable" seems plainly wrong.

In the DWARF this type is:

 <1><a62>: Abbrev Number: 12 (DW_TAG_pointer_type)
    <a63>   DW_AT_type        : <0xa6b>
    <a67>   DW_AT_name        : (indirect string, offset: 0x35b): &[usize; 3]


But the TYPE_NAME is NULL.

Maybe dwarf2read should preserve the names of pointer types in Rust.
However, rust-lang should also handle TYPE_CODE_PTR in ptype, rather than
delegating it to C.

-- 
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]