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/22936] some tests fail with rustc 1.24


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

--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
(In reply to Mark Wielaard from comment #2)
> Do you have the full DIE tree for this structure and enum type?
> Also could you show how the values are encoded (eu-readelf should tell you).
> Or could you attach a minimal reproducer?

If you install rustc 1.24 a pretty small test case is already in gdb.
I'll append the eu-readelf dump of the relevant DWARF.

> Did you reach out to the rustc compiler people to ask why they encode things
> this way and what they believe the interpretation is?

Not yet, but I'll do that.


The enum "MoreComplicated" from simple.rs looks like:

pub struct HiBob {
    pub field1: i32,
    field2: u64,
}

enum MoreComplicated {
    One,
    Two(i32),
    Three(HiBob),
    Four{this: bool, is: u8, a: char, struct_: u64, variant: u32},
}


I left out "HiBob" and also the type of the discriminant from this DWARF:


 [  2c92]      union_type
               name                 (strp) "MoreComplicated"
               byte_size            (data1) 24
               ??? (0x88)           (udata) 8
 [  2c99]        member
                 type                 (ref4) [  2cc8]
                 byte_size            (data1) 24
                 bit_size             (data1) 8
                 bit_offset           (data1) 56
                 data_member_location (data8) 1ffffffffffffff0
 [  2ca9]        member
                 type                 (ref4) [  2cdb]
                 byte_size            (data1) 24
                 bit_size             (data1) 64
                 bit_offset           (data1) 0
                 data_member_location (data8) 1ffffffffffffff0
 [  2cb9]        member
                 type                 (ref4) [  2cf9]
                 ??? (0x88)           (udata) 8
                 data_member_location (data1) 0
 [  2cc0]        member
                 type                 (ref4) [  2d35]
                 ??? (0x88)           (udata) 8
                 data_member_location (data1) 0
 [  2cc8]      structure_type
               name                 (strp) "One"
               byte_size            (data1) 24
               ??? (0x88)           (udata) 8
 [  2ccf]        member
                 name                 (strp) "RUST$ENUM$DISR"
                 type                 (ref4) [  2750]
                 ??? (0x88)           (udata) 1
                 data_member_location (data1) 0
 [  2cdb]      structure_type
               name                 (strp) "Two"
               byte_size            (data1) 24
               ??? (0x88)           (udata) 8
 [  2ce2]        member
                 name                 (strp) "RUST$ENUM$DISR"
                 type                 (ref4) [  2750]
                 ??? (0x88)           (udata) 1
                 data_member_location (data1) 0
 [  2ced]        member
                 name                 (strp) "__0"
                 type                 (ref4) [  3056]
                 ??? (0x88)           (udata) 4
                 data_member_location (data1) 4
 [  2cf9]      structure_type
               name                 (strp) "Three"
               byte_size            (data1) 24
               ??? (0x88)           (udata) 8
 [  2d00]        member
                 name                 (strp) "RUST$ENUM$DISR"
                 type                 (ref4) [  2750]
                 ??? (0x88)           (udata) 1
                 data_member_location (data1) 0
 [  2d0b]        member
                 name                 (strp) "__0"
                 type                 (ref4) [  2d17]
                 ??? (0x88)           (udata) 8
                 data_member_location (data1) 8
 [  2d17]      structure_type
               name                 (strp) "HiBob"
               byte_size            (data1) 16
               ??? (0x88)           (udata) 8
 [  2d1e]        member
                 name                 (strp) "field1"
                 type                 (ref4) [  3056]
                 ??? (0x88)           (udata) 4
                 data_member_location (data1) 8
 [  2d29]        member
                 name                 (strp) "field2"
                 type                 (ref4) [  3081]
                 ??? (0x88)           (udata) 8
                 data_member_location (data1) 0
 [  2d35]      structure_type
               name                 (strp) "Four"
               byte_size            (data1) 24
               ??? (0x88)           (udata) 8
 [  2d3c]        member
                 name                 (strp) "RUST$ENUM$DISR"
                 type                 (ref4) [  2750]
                 ??? (0x88)           (udata) 1
                 data_member_location (data1) 0
 [  2d47]        member
                 name                 (strp) "this"
                 type                 (ref4) [  3088]
                 ??? (0x88)           (udata) 1
                 data_member_location (data1) 1
 [  2d52]        member
                 name                 (strp) "is"
                 type                 (ref4) [  2e40]
                 ??? (0x88)           (udata) 1
                 data_member_location (data1) 2
 [  2d5d]        member
                 name                 (strp) "a"
                 type                 (ref4) [  308f]
                 ??? (0x88)           (udata) 4
                 data_member_location (data1) 4
 [  2d68]        member
                 name                 (strp) "struct_"
                 type                 (ref4) [  3081]
                 ??? (0x88)           (udata) 8
                 data_member_location (data1) 10
 [  2d73]        member
                 name                 (strp) "variant"
                 type                 (ref4) [  3096]
                 ??? (0x88)           (udata) 4
                 data_member_location (data1) 8

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