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/21893] template_argument(0) gives syntax error


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

--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
(In reply to Jeff Muizelaar from comment #2)
> https://github.com/rust-lang/rust/issues/9224 seems to suggest that rustc is
> emitting DW_AT_template_type_param

Not always.  Consider this test (from that bug):

pub struct Generic<T: Clone>(T);
pub struct Normal(i32);

fn main () {
    let generic = Generic(10);
    let normal = Normal(10);
    generic;
    normal;
}

Here the DWARF for Generic<i32> is just:

 <2><81>: Abbrev Number: 6 (DW_TAG_structure_type)
    <82>   DW_AT_name        : (indirect string, offset: 0x6e): Generic<i32>
    <86>   DW_AT_byte_size   : 4
    <87>   Unknown AT value: 88: 4
 <3><88>: Abbrev Number: 7 (DW_TAG_member)
    <89>   DW_AT_name        : (indirect string, offset: 0x66): __0
    <8d>   DW_AT_type        : <0xa8>
    <91>   Unknown AT value: 88: 4
    <92>   DW_AT_data_member_location: 0
 <3><93>: Abbrev Number: 0

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