This is the mail archive of the gdb-prs@sources.redhat.com 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]

Re: gdb/726: Internal GDB errors with current GDB snapshots and -gdwarf2-3


The following reply was made to PR gdb/726; it has been noted by GNATS.

From: Andris Pavenis <pavenis@latnet.lv>
To: ac131313@redhat.com, gdb-gnats@sources.redhat.com
Cc:  
Subject: Re: gdb/726: Internal GDB errors with current GDB snapshots and -gdwarf2-3
Date: Sat, 28 Sep 2002 15:10:43 +0300

 On Friday 27 September 2002 03:14, ac131313@redhat.com wrote:
 > >Number:         726
 > >Category:       gdb
 > >Synopsis:       Internal GDB errors with current GDB snapshots and
 > > -gdwarf2-3 Confidential:   no
 > >Severity:       serious
 > >Priority:       medium
 > >Responsible:    unassigned
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Thu Sep 26 17:18:01 PDT 2002
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     ac131313@redhat.com
 > >Release:        2002-09-26?
 > >Organization:
 > >Environment:
 > >
 > >Description:
 >
 > Subject:
 > Internal GDB errors with current GDB snapshots and -gdwarf-23
 > From:
 > pavenis@lanet.lv
 > Date:
 > Thu, 29 Aug 2002 14:38:42 +0300
 > To:
 > djgpp-workers@delorie.com
 > CC:
 > gdb@sources.redhat.com
 >
 > Built GDB 20020828 snapshot (current tree) for target i586-pc-msdosdjgpp.
 > Got following problem. If  the sources are compiled using option
 > -gdwarf-23 then GDB gets internal error (see below). It doesn't happen
 > if -gdwarf-22 is being used.
 >
 > It is not the first time I see this problem with current GDB tree in some
 > last months.
 >
 > I used gcc-3.2 and binutils-2.13
 >
 
 Tried to dig what is the source of this trouble and after some hacking it=20
 seems that GCC-3.2 (and current CVS) incorrectly reports #include from line=
  1=20
 of top source file as being from line 2 when GCC command line options=20
 =2Dimacros is being used.
 
 After that it was easy to reproduce a bug under Linux (GCC-3.2,=20
 gdb 5.2.90_20020923) with following simple sources:
 
 =2D-----------------------  bug.cc ----------------------------------------=
 =2D---
 #include <string>
 #include <iostream>
 
 int main (void)
 {
    std::string Hello("Hello");
    std::cout << Hello << std::endl;
    return 0;
 }
 =2D----------------------- foo.h (empty file)  ----------------------------=
 =2D----
 =2D------------------------------------------------------------------------=
 =2D----
 
 GCC command line:
 
 g++ -O2 -g3 -imacros foo.h bug.cc -o bug
 
 After that:
 
 gdb bug
 tb main
 
 generate Internal GDB error as mentioned in initial bug report. If I insert=
  an=20
 empty line at start of file bug.cc the problem disappears.
 
 Andris
 


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