public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/41445]  New: Debug information is wrong with and without --save-temps.
@ 2009-09-23  9:12 ramana at gcc dot gnu dot org
  2009-09-23 12:32 ` [Bug preprocessor/41445] " jakub at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: ramana at gcc dot gnu dot org @ 2009-09-23  9:12 UTC (permalink / raw)
  To: gcc-bugs

The line number information is off by 1 with and without --save-temps. I faced
this problem when attempting to bootstrap using distcc and got a number of
comparison failures. 

e200593-lin:ramrad01 675 > arm-none-linux-gnueabi-gcc -S -O2 -g t.c -o t1.s -dA
e200593-lin:ramrad01 676 > arm-none-linux-gnueabi-gcc -S -O2 -g t.c -o t2.s
--save-temps -dA
--- t1.s        2009-09-23 10:06:25.000000000 +0100
+++ t2.s        2009-09-23 10:06:30.000000000 +0100
@@ -74,7 +74,7 @@
        .uleb128 0x9    @ (DIE (0x6d) DW_TAG_member)
        .4byte  .LASF7  @ DW_AT_name: "symtab"
        .byte   0x1     @ DW_AT_decl_file (t.h)
-       .byte   0x9     @ DW_AT_decl_line
+       .byte   0x8     @ DW_AT_decl_line
        .4byte  0x25    @ DW_AT_type
        .byte   0x2     @ DW_AT_data_member_location
        .byte   0x23    @ DW_OP_plus_uconst




Consider the testcase below.

e200593-lin:ramrad01 51 > cat t.c  
#include "t.h"
struct tree_type type_decl;
e200593-lin:ramrad01 > cat t.h
#include "ct.h"
struct tree_type GTY(())
{
  union tree_type_symtab {
    int GTY ((tag ("0"))) address;
    const char * GTY ((tag ("1"))) pointer;
  } GTY ((desc ("debug_hooks == &sdb_debug_hooks ? 1 : debug_hooks ==
&dwarf2_debug_hooks ? 2 : 0"),
          descbits ("2"))) symtab;
};
e200593-lin:ramrad01> cat ct.h
#define GTY(x) 


The line number information for the member symtab is off by 1 . It's something
to do with the difference in line number information for the integrated
preprocessor where the integrated preprocessor seems to think that the line
number for symtab is 8 but the information from the saved pre-processed input 
indicates that the line number is 9.


-- 
           Summary: Debug information is wrong with and without --save-
                    temps.
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ramana at gcc dot gnu dot org
 GCC build triplet: i686-linux-gnu
GCC target triplet: arm-none-linux-gnueabi


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


^ permalink raw reply	[flat|nested] 8+ messages in thread
[parent not found: <bug-41445-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2011-03-31  9:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-23  9:12 [Bug preprocessor/41445] New: Debug information is wrong with and without --save-temps ramana at gcc dot gnu dot org
2009-09-23 12:32 ` [Bug preprocessor/41445] " jakub at gcc dot gnu dot org
2009-10-06 13:17 ` jakub at gcc dot gnu dot org
2009-10-07  7:38 ` jakub at gcc dot gnu dot org
2009-10-07  8:20 ` jakub at gcc dot gnu dot org
2009-10-09 19:56 ` jakub at gcc dot gnu dot org
2010-01-04 11:09 ` ramana at gcc dot gnu dot org
     [not found] <bug-41445-4@http.gcc.gnu.org/bugzilla/>
2011-03-31  9:53 ` jakub at gcc dot gnu.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).