[Bug debug/20253] [3.4/4.0/4.1 regression]: Macro debug info broken due to lexer change

2005-03-03 Thread cvs-commit at gcc dot gnu dot org

--- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-03-04 
03:08 ---
Subject: Bug 20253

CVSROOT:/cvs/gcc
Module name:gcc
Changes by: [EMAIL PROTECTED]   2005-03-04 03:08:11

Modified files:
gcc: ChangeLog c-opts.c dwarf2out.c 
Added files:
gcc/testsuite/gcc.dg/debug/dwarf2: dwarf2-macro.c 

Log message:
2005-03-03  Daniel Berlin [EMAIL PROTECTED]

Fix PR debug/20253

* c-opts.c (c_common_parse_file): Call start_source_file
and end_source_file at the approriate times.

* dwarf2out.c (dwarf2out_finish): Don't auto-end
the main file, it will be done for us now.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gccr1=2.7659r2=2.7660
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-opts.c.diff?cvsroot=gccr1=1.136r2=1.137
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/dwarf2out.c.diff?cvsroot=gccr1=1.570r2=1.571
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro.c.diff?cvsroot=gccr1=NONEr2=1.1



-- 


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


[Bug debug/20253] [3.4/4.0/4.1 regression]: Macro debug info broken due to lexer change

2005-03-02 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-02 
20:45 ---
Patch here: http://gcc.gnu.org/ml/gcc-patches/2005-03/msg00169.html.

-- 
   What|Removed |Added

   Keywords||patch


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


[Bug debug/20253] [3.4/4.0/4.1 regression]: Macro debug info broken due to lexer change

2005-03-01 Thread dberlin at gcc dot gnu dot org

--- Additional Comments From dberlin at gcc dot gnu dot org  2005-03-01 
18:00 ---
I'll fix this bug if someone can test the fix on a stabs machine for me.

-- 
   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |dberlin at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2005-02-28 20:12:18 |2005-03-01 18:00:11
   date||


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


[Bug debug/20253] [3.4/4.0/4.1 regression]: Macro debug info broken due to lexer change

2005-03-01 Thread dpatel at apple dot com

--- Additional Comments From dpatel at apple dot com  2005-03-01 18:18 
---
Subject: Re:  [3.4/4.0/4.1 regression]: Macro debug info broken due to lexer 
change


On Mar 1, 2005, at 10:00 AM, dberlin at gcc dot gnu dot org wrote:

 I'll fix this bug if someone can test the fix on a stabs machine for 
 me.

I can run gdb test suite on powerpc-darwin. Note: FSF gdb does not have 
darwin port so darwin gdb is not similar to the one used by other stabs 
platform.

-
Devang



-- 


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


[Bug debug/20253] [3.4/4.0/4.1 regression]: Macro debug info broken due to lexer change

2005-02-28 Thread pinskia at gcc dot gnu dot org


-- 
   What|Removed |Added

   Keywords||wrong-debug
Summary|[3.4/4.0 regression]: Macro |[3.4/4.0/4.1 regression]:
   |debug info broken due to|Macro debug info broken due
   |lexer change|to lexer change
   Target Milestone|--- |3.4.4


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


[Bug debug/20253] [3.4/4.0/4.1 regression]: Macro debug info broken due to lexer change

2005-02-28 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-28 
20:12 ---
Just a note this has been broken since 3.4 20031218, the day before the 
changing the version of 
3.4.0 to 3.4.0.

-- 
   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
 Status|UNCONFIRMED |NEW
 Ever Confirmed||1
   Last reconfirmed|-00-00 00:00:00 |2005-02-28 20:12:18
   date||


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


[Bug debug/20253] [3.4/4.0/4.1 regression]: Macro debug info broken due to lexer change

2005-02-28 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-28 
20:18 ---
Note this does not work with the C++ front-end either.

-- 
   What|Removed |Added

  Known to fail||3.4.0 4.0.0
  Known to work||3.3.3 3.2.3


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


[Bug debug/20253] [3.4/4.0/4.1 regression]: Macro debug info broken due to lexer change

2005-02-28 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-28 
20:30 ---
Broke by:
http://gcc.gnu.org/ml/gcc-patches/2003-07/msg00364.html

I found this by searching for start_source_file and 2003 and then I just say 
this and reverted it and it 
was fixed once I reverted it.

-- 
   What|Removed |Added

 CC||dpatel at apple dot com


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


[Bug debug/20253] [3.4/4.0/4.1 regression]: Macro debug info broken due to lexer change

2005-02-28 Thread dberlin at gcc dot gnu dot org

--- Additional Comments From dberlin at gcc dot gnu dot org  2005-02-28 
20:39 ---
Devang, we *need* to have a start_source_file for the main source file.
It is required by the standard that we ouptut a begin/end pair for the main
source file, and the start_source_file call is where this should be done.

If STABS needs to do something else, it should simply ignore the first call to
start_source file.

Please note that this fixing this may break your followup patch to try to fix
-feliminate-dwarf2-dups, and cause it to be redone:


revision 1.457
date: 2003/10/06 22:25:15;  author: dpatel;  state: Exp;  lines: +1 -10
Fix -feliminate-dwarf2-dups ICE.

   gcc
   * dwarf2out.c (is_main_source): Remove variable.
   (dwarf2out_start_source_file): Do not check is_main_source.
   Do not reset is_main_source.
   (dwarf2out_init): Do not initialize is_main_source.

   testsuite
   * gcc.dg/debug/dwarf2-3.h: New test.
   * gcc.dg/debug/dwarf2-3.c: New test case for -feliminate-dwarf2-dups.

The check i meant below to look for in the .s file is actually wrong, you want
to look for 
  .byte   0x3 # Start new file
.uleb128 0x0# Included from line number 0
.file 1 filename of test


-- 


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


[Bug debug/20253] [3.4/4.0/4.1 regression]: Macro debug info broken due to lexer change

2005-02-28 Thread dpatel at apple dot com

--- Additional Comments From dpatel at apple dot com  2005-02-28 20:48 
---
Subject: Re:  [3.4/4.0/4.1 regression]: Macro debug info broken due to lexer 
change

I extensively tested my patch using GDB tests suites on two target with 
STABS as well as DWARF. But if, we need to have a start_source_file for 
the main source file then we we also need to have end_source_file for 
main source file. I was just trying to balance BINCL/EINCL counts. And 
nobody noticed this until now.

Andrew, would it be possible for you to try this?
Thanks,
-
Devang



-- 


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


[Bug debug/20253] [3.4/4.0/4.1 regression]: Macro debug info broken due to lexer change

2005-02-28 Thread dberlin at dberlin dot org

--- Additional Comments From dberlin at gcc dot gnu dot org  2005-02-28 
21:00 ---
Subject: Re:  [3.4/4.0/4.1 regression]: Macro debug info
broken due to lexer change

On Mon, 2005-02-28 at 20:48 +, dpatel at apple dot com wrote:

 I extensively tested my patch using GDB tests suites on two target with 
 STABS as well as DWARF. 

You must have accidently used the system compiler, because gdb has a
testsuite for dwarf2 macros that fails if i compile it with your patch
turned on.
It's a very tricky to tell gdb what compiler to use for it's testsuite.


 But if, we need to have a start_source_file for 
 the main source file the
 n we we also need to have end_source_file for main source file.

Yes, i should have added that.
You'll note the current scheme is to simply output an explicit end_file
for the macro info in dwarf2out_finish.

If you want to find the right place to output an end_file, and remove
that, that would be fine.


  I was just trying to balance BINCL/EINCL counts. And 
 nobody noticed this until now.
True enough.







-- 


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


[Bug debug/20253] [3.4/4.0/4.1 regression]: Macro debug info broken due to lexer change

2005-02-28 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-28 
21:41 ---
(In reply to comment #5)
 Subject: Re:  [3.4/4.0/4.1 regression]: Macro debug info broken due to lexer 
 change
 
 Andrew, would it be possible for you to try this?

I don't really have time to do this at all, I took a couple of minutes to 
figure out what patch caused it as 
I try to do with all the regressions which are reported.

-- 


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