public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/39471]  New: DW_TAG_imported_module should be used (not DW_TAG_imported_declaration)
@ 2009-03-16 14:42 jan dot kratochvil at redhat dot com
  2009-03-16 20:56 ` [Bug debug/39471] " jakub at gcc dot gnu dot org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: jan dot kratochvil at redhat dot com @ 2009-03-16 14:42 UTC (permalink / raw)
  To: gcc-bugs

Regression from g++-4.3 for GNU C++ 4.4.0 20090315 (experimental)
(+also for 4.4.0 20090313 (Red Hat 4.4.0-0.26))
For full namespace import one should use DW_TAG_imported_module.

1:namespace A
2:{
3:  int i = 1;
4:}
5:
6:int
7:main ()
8:{
9:  using namespace A;
10:  i = 2;
11:  return 0;
12:}

Using g++-4.4 DWARF one must use `A::i' at `main' in the debugger.
The whole namespace `A' should be imported there instead.

WRONG g++-4.4 debuginfo:
    < c>   DW_AT_producer    : (indirect string, offset: 0x0): GNU C++ 4.4.0
20090315 (experimental)
 <1><2d>: Abbrev Number: 2 (DW_TAG_subprogram)
    <2f>   DW_AT_name        : (indirect string, offset: 0x7d): main    
 <2><51>: Abbrev Number: 3 (DW_TAG_lexical_block)
    <52>   DW_AT_low_pc      : 0x4      
    <5a>   DW_AT_high_pc     : 0x13     
 <3><62>: Abbrev Number: 4 (DW_TAG_imported_declaration)
    <65>   DW_AT_name        : A        
    <67>   DW_AT_import      : <0x74>   [Abbrev Number: 6 (DW_TAG_namespace)]
 <1><74>: Abbrev Number: 6 (DW_TAG_namespace)
    <75>   DW_AT_name        : A        
 <2><7d>: Abbrev Number: 7 (DW_TAG_variable)
    <7e>   DW_AT_name        : i        
    <82>   DW_AT_MIPS_linkage_name: (indirect string, offset: 0x74): _ZN1A1iE   

Correct g++-4.3 debuginfo:
    < c>   DW_AT_producer    : (indirect string, offset: 0x0): GNU C++ 4.3.2
20081105 (Red Hat 4.3.2-7)
 <1><2d>: Abbrev Number: 2 (DW_TAG_subprogram)
    <2f>   DW_AT_name        : (indirect string, offset: 0x80): main    
 <2><51>: Abbrev Number: 3 (DW_TAG_imported_module)
    <54>   DW_AT_import      : <0x60>   [Abbrev Number: 5 (DW_TAG_namespace)]
 <1><60>: Abbrev Number: 5 (DW_TAG_namespace)
    <61>   DW_AT_name        : A        
 <2><69>: Abbrev Number: 6 (DW_TAG_variable)
    <6a>   DW_AT_name        : i        
    <6e>   DW_AT_MIPS_linkage_name: (indirect string, offset: 0x77): _ZN1A1iE   
    <72>   DW_AT_type        : <0x59>   

It causes regressions on gdb.cp/namespace-using.exp for the GDB project Archer.


-- 
           Summary: DW_TAG_imported_module should be used (not
                    DW_TAG_imported_declaration)
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jan dot kratochvil at redhat dot com
GCC target triplet: x86_64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39471


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-03-17 17:56 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-16 14:42 [Bug debug/39471] New: DW_TAG_imported_module should be used (not DW_TAG_imported_declaration) jan dot kratochvil at redhat dot com
2009-03-16 20:56 ` [Bug debug/39471] " jakub at gcc dot gnu dot org
2009-03-16 21:38 ` jan dot kratochvil at redhat dot com
2009-03-17  7:46 ` jakub at gcc dot gnu dot org
2009-03-17  7:54 ` dodji at redhat dot com
2009-03-17  7:59 ` dodji at redhat dot com
2009-03-17  8:09 ` dodji at redhat dot com
2009-03-17  8:52 ` jakub at gcc dot gnu dot org
2009-03-17 10:02 ` dodji at redhat dot com
2009-03-17 10:05 ` jan dot kratochvil at redhat dot com
2009-03-17 12:24 ` jan dot kratochvil at redhat dot com
2009-03-17 12:28 ` jakub at gcc dot gnu dot org
2009-03-17 15:18 ` swagiaal at redhat dot com
2009-03-17 17:50 ` jakub at gcc dot gnu dot org
2009-03-17 17:56 ` jakub at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).