This is the mail archive of the archer@sourceware.org mailing list for the Archer 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]

Re: DW_TAG_imported_declaration DW_TAG_base_type w/o DW_AT_name [Re:using directive patch]


Results in:
	die = <8c>
	imported_die = <3b>
	imported_name = "B"
so the import gets processed, doesn't it?

Yes agreed... bad code example.


Do you have a reproducer of incorrect GDB behavior?

Yes. Upon further digging I found the gcc bug. Here is a much better example:

namespace A{
  typedef int B;
}

int main(){
  using A::B;
  B b;
  return b;
}

...
 <2><51>: Abbrev Number: 3 (DW_TAG_imported_declaration)
    <52>   DW_AT_decl_file   : 1
    <53>   DW_AT_decl_line   : 6
    <54>   DW_AT_import      : <0x75>
 <2><58>: Abbrev Number: 4 (DW_TAG_typedef)
    <59>   DW_AT_name        : B
    <5b>   DW_AT_decl_file   : 1
    <5c>   DW_AT_decl_line   : 2
    <5d>   DW_AT_type        : <0x6e>
...
 <1><75>: Abbrev Number: 7 (DW_TAG_base_type)
    <76>   DW_AT_byte_size   : 4
    <77>   DW_AT_encoding    : 5        (signed)

Import from line 6 is not importing 0x75 as gcc reports. It is importing 0x58. In which case the imported_name would be B.

Will open a gcc bug :)

Sami


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