This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug debug/20404] New: dwarf2: no DW_MACINFO_start_file for the "base" source file


* the options given when GCC was configured/built;

Configured with: 
/home/niva/svnwork/gccvendorcurrent/configure
--with-headers=/home/niva/oc2000/mips/src/include
 --without-libs --enable-generated-files-in-srcdir --enable-threads=posix
-with-dwarf2 
 --disable-shared --target=mips64-none-elf --verbose --enable-languages=c 
 --srcdir=/home/niva/svnwork/gccvendorcurrent --prefix=/home/niva/local --enable-cpp

     * the complete command line that triggers the bug;

mips64-none-elf-gcc -v -g3 -c -o macros.o macros1.c -DMYMACRO="123456" -UTTT
mips64-none-elf-readelf --debug-dump=macro macros1.o

     * the compiler output (error messages, warnings, etc.);

No error messages

     * There is no DW_MACRO_start_file for the "base" source file
       submitted to the compiler for compilation.  

       According to the document "DWARF Debugging Information Format", 
       Version 3 November 12, 2003 (Draft 9), see
       6.3.2 Base Source Entries, 

       "In addition to producing a matched pair of DW_MACRO_start_file
       and DW_MACRO_end_file entries for each inclusion directive
       actually processed during compilation, A PRODUCER SHOULD GENERATE
       SUCH A MATCHED PAIR ALSO FOR THE "BASE" SOURCE FILE SUBMITTED TO 
       THE COMPILER FOR COMPILATION."  
       
       But readelf does not show a DW_MACRO_start_file for the "base"
       source file.

     * NOTE: gcc-3.2.2 GENERATED the DW_MACRO_start_file entry for the 
       "base" source file.

     * the  preprocessed  file (*.i*)

# 1 "macros1.c"
# 1 "/home/niva/tests/from_kost/debug1//"
# 1 "<built-in>"
#define __STDC_HOSTED__ 1
#define __GNUC__ 3
#define __GNUC_MINOR__ 4
#define __GNUC_PATCHLEVEL__ 3
#define __SIZE_TYPE__ unsigned int
#define __PTRDIFF_TYPE__ int
#define __WCHAR_TYPE__ int
#define __WINT_TYPE__ unsigned int
#define __GXX_ABI_VERSION 1002
#define __SCHAR_MAX__ 127
#define __SHRT_MAX__ 32767
#define __INT_MAX__ 2147483647
#define __LONG_MAX__ 2147483647L
#define __LONG_LONG_MAX__ 9223372036854775807LL
#define __WCHAR_MAX__ 2147483647
#define __CHAR_BIT__ 8
#define __FLT_EVAL_METHOD__ 0
#define __FLT_RADIX__ 2
#define __FLT_MANT_DIG__ 24
#define __FLT_DIG__ 6
#define __FLT_MIN_EXP__ (-125)
#define __FLT_MIN_10_EXP__ (-37)
#define __FLT_MAX_EXP__ 128
#define __FLT_MAX_10_EXP__ 38
#define __FLT_MAX__ 3.40282347e+38F
#define __FLT_MIN__ 1.17549435e-38F
#define __FLT_EPSILON__ 1.19209290e-7F
#define __FLT_DENORM_MIN__ 1.40129846e-45F
#define __FLT_HAS_INFINITY__ 1
#define __FLT_HAS_QUIET_NAN__ 1
#define __DBL_MANT_DIG__ 53
#define __DBL_DIG__ 15
#define __DBL_MIN_EXP__ (-1021)
#define __DBL_MIN_10_EXP__ (-307)
#define __DBL_MAX_EXP__ 1024
#define __DBL_MAX_10_EXP__ 308
#define __DBL_MAX__ 1.7976931348623157e+308
#define __DBL_MIN__ 2.2250738585072014e-308
#define __DBL_EPSILON__ 2.2204460492503131e-16
#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
#define __DBL_HAS_INFINITY__ 1
#define __DBL_HAS_QUIET_NAN__ 1
#define __LDBL_MANT_DIG__ 53
#define __LDBL_DIG__ 15
#define __LDBL_MIN_EXP__ (-1021)
#define __LDBL_MIN_10_EXP__ (-307)
#define __LDBL_MAX_EXP__ 1024
#define __LDBL_MAX_10_EXP__ 308
#define __DECIMAL_DIG__ 17
#define __LDBL_MAX__ 1.7976931348623157e+308L
#define __LDBL_MIN__ 2.2250738585072014e-308L
#define __LDBL_EPSILON__ 2.2204460492503131e-16L
#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
#define __LDBL_HAS_INFINITY__ 1
#define __LDBL_HAS_QUIET_NAN__ 1
#define __REGISTER_PREFIX__ 
#define __USER_LABEL_PREFIX__ 
#define __VERSION__ "3.4.3"
#define __NO_INLINE__ 1
#define __FINITE_MATH_ONLY__ 0

#define __mips__ 1
#define _mips 1
#define mips 1
#define __mips64 1
#define __R4000 1
#define __R4000__ 1
#define R4000 1
#define _R4000 1
#define __mips_fpr 64
#define _MIPS_ARCH_MIPS3 1
#define _MIPS_ARCH "mips3"
#define _MIPS_TUNE_MIPS3 1
#define _MIPS_TUNE "mips3"
#define __mips 3
#define _MIPS_ISA _MIPS_ISA_MIPS3
#define __mips_hard_float 1
#define __MIPSEB 1
#define __MIPSEB__ 1
#define MIPSEB 1
#define _MIPSEB 1
#define __LANGUAGE_C 1
#define __LANGUAGE_C__ 1
#define LANGUAGE_C 1
#define _LANGUAGE_C 1
# 1 "<command line>"
#define MYMACRO 123456
#undef TTT
# 1 "macros1.c"
# 1 "macros.c" 1
#define max(x,y) ((x) >= (y) ? (x) : (y))


#define min(x,y) ((x) <= (y) ? (x) : (y))


int main ()
{
  int i = 6, k = 7;
  return ((i) <= (k) ? (i) : (k)) + ((i) >= (k) ? (i) : (k));
}
# 2 "macros1.c" 2





    * The output of "mips64-none-elf-readelf --debug-dump=macro macros1.o":

  Contents of the .debug_macinfo section:

 DW_MACINFO_define - lineno : 1 macro : __STDC_HOSTED__ 1
 DW_MACINFO_define - lineno : 2 macro : __GNUC__ 3
 DW_MACINFO_define - lineno : 3 macro : __GNUC_MINOR__ 4
 DW_MACINFO_define - lineno : 4 macro : __GNUC_PATCHLEVEL__ 3
 DW_MACINFO_define - lineno : 5 macro : __SIZE_TYPE__ unsigned int
 DW_MACINFO_define - lineno : 6 macro : __PTRDIFF_TYPE__ int
 DW_MACINFO_define - lineno : 7 macro : __WCHAR_TYPE__ int
 DW_MACINFO_define - lineno : 8 macro : __WINT_TYPE__ unsigned int
 DW_MACINFO_define - lineno : 9 macro : __GXX_ABI_VERSION 1002
 DW_MACINFO_define - lineno : 10 macro : __SCHAR_MAX__ 127
 DW_MACINFO_define - lineno : 11 macro : __SHRT_MAX__ 32767
 DW_MACINFO_define - lineno : 12 macro : __INT_MAX__ 2147483647
 DW_MACINFO_define - lineno : 13 macro : __LONG_MAX__ 2147483647L
 DW_MACINFO_define - lineno : 14 macro : __LONG_LONG_MAX__ 9223372036854775807LL
DW_MACINFO_define - lineno : 15 macro : __WCHAR_MAX__ 2147483647
 DW_MACINFO_define - lineno : 16 macro : __CHAR_BIT__ 8
 DW_MACINFO_define - lineno : 17 macro : __FLT_EVAL_METHOD__ 0
 DW_MACINFO_define - lineno : 18 macro : __FLT_RADIX__ 2
 DW_MACINFO_define - lineno : 19 macro : __FLT_MANT_DIG__ 24
 DW_MACINFO_define - lineno : 20 macro : __FLT_DIG__ 6
 DW_MACINFO_define - lineno : 21 macro : __FLT_MIN_EXP__ (-125)
 DW_MACINFO_define - lineno : 22 macro : __FLT_MIN_10_EXP__ (-37)
 DW_MACINFO_define - lineno : 23 macro : __FLT_MAX_EXP__ 128
 DW_MACINFO_define - lineno : 24 macro : __FLT_MAX_10_EXP__ 38
 DW_MACINFO_define - lineno : 25 macro : __FLT_MAX__ 3.40282347e+38F
 DW_MACINFO_define - lineno : 26 macro : __FLT_MIN__ 1.17549435e-38F
 DW_MACINFO_define - lineno : 27 macro : __FLT_EPSILON__ 1.19209290e-7F
 DW_MACINFO_define - lineno : 28 macro : __FLT_DENORM_MIN__ 1.40129846e-45F
 DW_MACINFO_define - lineno : 29 macro : __FLT_HAS_INFINITY__ 1
 DW_MACINFO_define - lineno : 30 macro : __FLT_HAS_QUIET_NAN__ 1
 DW_MACINFO_define - lineno : 31 macro : __DBL_MANT_DIG__ 53
 DW_MACINFO_define - lineno : 32 macro : __DBL_DIG__ 15
 DW_MACINFO_define - lineno : 33 macro : __DBL_MIN_EXP__ (-1021)
 DW_MACINFO_define - lineno : 34 macro : __DBL_MIN_10_EXP__ (-307)
 DW_MACINFO_define - lineno : 35 macro : __DBL_MAX_EXP__ 1024
 DW_MACINFO_define - lineno : 36 macro : __DBL_MAX_10_EXP__ 308
 DW_MACINFO_define - lineno : 37 macro : __DBL_MAX__ 1.7976931348623157e+308
 DW_MACINFO_define - lineno : 38 macro : __DBL_MIN__ 2.2250738585072014e-308
 DW_MACINFO_define - lineno : 39 macro : __DBL_EPSILON__ 2.2204460492503131e-16
 DW_MACINFO_define - lineno : 40 macro : __DBL_DENORM_MIN__ 4.9406564584124654e-324
 DW_MACINFO_define - lineno : 41 macro : __DBL_HAS_INFINITY__ 1
 DW_MACINFO_define - lineno : 42 macro : __DBL_HAS_QUIET_NAN__ 1
 DW_MACINFO_define - lineno : 43 macro : __LDBL_MANT_DIG__ 53
 DW_MACINFO_define - lineno : 44 macro : __LDBL_DIG__ 15
 DW_MACINFO_define - lineno : 45 macro : __LDBL_MIN_EXP__ (-1021)
 DW_MACINFO_define - lineno : 46 macro : __LDBL_MIN_10_EXP__ (-307)
 DW_MACINFO_define - lineno : 47 macro : __LDBL_MAX_EXP__ 1024
 DW_MACINFO_define - lineno : 48 macro : __LDBL_MAX_10_EXP__ 308
 DW_MACINFO_define - lineno : 49 macro : __DECIMAL_DIG__ 17
 DW_MACINFO_define - lineno : 50 macro : __LDBL_MAX__ 1.7976931348623157e+308L
 DW_MACINFO_define - lineno : 51 macro : __LDBL_MIN__ 2.2250738585072014e-308L
 DW_MACINFO_define - lineno : 52 macro : __LDBL_EPSILON__ 2.2204460492503131e-16L
 DW_MACINFO_define - lineno : 53 macro : __LDBL_DENORM_MIN__
4.9406564584124654e-324L
 DW_MACINFO_define - lineno : 54 macro : __LDBL_HAS_INFINITY__ 1
 DW_MACINFO_define - lineno : 55 macro : __LDBL_HAS_QUIET_NAN__ 1
 DW_MACINFO_define - lineno : 56 macro : __REGISTER_PREFIX__
 DW_MACINFO_define - lineno : 57 macro : __USER_LABEL_PREFIX__
 DW_MACINFO_define - lineno : 58 macro : __VERSION__ "3.4.3"
 DW_MACINFO_define - lineno : 59 macro : __NO_INLINE__ 1
 DW_MACINFO_define - lineno : 60 macro : __FINITE_MATH_ONLY__ 0
 DW_MACINFO_define - lineno : 62 macro : __mips__ 1
 DW_MACINFO_define - lineno : 63 macro : _mips 1
 DW_MACINFO_define - lineno : 64 macro : mips 1
 DW_MACINFO_define - lineno : 65 macro : __mips64 1
 DW_MACINFO_define - lineno : 66 macro : __R4000 1
 DW_MACINFO_define - lineno : 67 macro : __R4000__ 1
 DW_MACINFO_define - lineno : 68 macro : R4000 1
 DW_MACINFO_define - lineno : 69 macro : _R4000 1
 DW_MACINFO_define - lineno : 70 macro : __mips_fpr 64
 DW_MACINFO_define - lineno : 71 macro : _MIPS_ARCH_MIPS3 1
 DW_MACINFO_define - lineno : 72 macro : _MIPS_ARCH "mips3"
 DW_MACINFO_define - lineno : 73 macro : _MIPS_TUNE_MIPS3 1
 DW_MACINFO_define - lineno : 74 macro : _MIPS_TUNE "mips3"
 DW_MACINFO_define - lineno : 75 macro : __mips 3
 DW_MACINFO_define - lineno : 76 macro : _MIPS_ISA _MIPS_ISA_MIPS3
 DW_MACINFO_define - lineno : 77 macro : __mips_hard_float 1
 DW_MACINFO_define - lineno : 78 macro : __MIPSEB 1
 DW_MACINFO_define - lineno : 79 macro : __MIPSEB__ 1
 DW_MACINFO_define - lineno : 80 macro : MIPSEB 1
 DW_MACINFO_define - lineno : 81 macro : _MIPSEB 1
 DW_MACINFO_define - lineno : 82 macro : __LANGUAGE_C 1
 DW_MACINFO_define - lineno : 83 macro : __LANGUAGE_C__ 1
 DW_MACINFO_define - lineno : 84 macro : LANGUAGE_C 1
 DW_MACINFO_define - lineno : 85 macro : _LANGUAGE_C 1
 DW_MACINFO_define - lineno : 1 macro : MYMACRO 123456
 DW_MACINFO_undef - lineno : 2 macro : TTT
 DW_MACINFO_start_file - lineno: 1 filenum: 1
 DW_MACINFO_define - lineno : 1 macro : max(x,y) ((x) >= (y) ? (x) : (y))
 DW_MACINFO_define - lineno : 4 macro : min(x,y) ((x) <= (y) ? (x) : (y))
 DW_MACINFO_end_file
 DW_MACINFO_end_file

-- 
           Summary: dwarf2: no DW_MACINFO_start_file for the "base" source
                    file
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: niva at niisi dot msk dot ru
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: mips64-none-elf


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


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