OSDN Git Service

* flags.h (enum debug_info_type): Remove DWARF_DEBUG.
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Aug 2004 07:34:54 +0000 (07:34 +0000)
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Aug 2004 07:34:54 +0000 (07:34 +0000)
* defaults.h (PREFERRED_DEBUGGING_TYPE): Remove check for
DWARF_DEBUGGING_INFO from choice-of-definition chain;
restructure using C89 features (#elif, #error).
* c-lex.c, final.c, opts.c, config/cris/cris.c, config/frv/frv.c
* config/sh/sh.h: Remove references to DWARF_DEBUG.
* doc/invoke.texi: Remove references to DWARF version 1;
clarify why -gdwarf-2<n> doesn't work.
cp:
* class.c, search.c: Remove references to DWARF_DEBUG.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86540 138bc75d-0d04-0410-961f-82ee72b054a4

13 files changed:
gcc/ChangeLog
gcc/c-lex.c
gcc/config/cris/cris.c
gcc/config/frv/frv.c
gcc/config/sh/sh.h
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/search.c
gcc/defaults.h
gcc/doc/invoke.texi
gcc/final.c
gcc/flags.h
gcc/opts.c

index 0168ed1..1f1758e 100644 (file)
@@ -1,5 +1,16 @@
 2004-08-25  Zack Weinberg  <zack@codesourcery.com>
 
+       * flags.h (enum debug_info_type): Remove DWARF_DEBUG.
+       * defaults.h (PREFERRED_DEBUGGING_TYPE): Remove check for
+       DWARF_DEBUGGING_INFO from choice-of-definition chain;
+       restructure using C89 features (#elif, #error).
+       * c-lex.c, final.c, opts.c, config/cris/cris.c, config/frv/frv.c
+       * config/sh/sh.h: Remove references to DWARF_DEBUG.
+       * doc/invoke.texi: Remove references to DWARF version 1;
+       clarify why -gdwarf-2<n> doesn't work.
+
+2004-08-25  Zack Weinberg  <zack@codesourcery.com>
+
        * basic-block.h (BB_SET_PARTITION): Clear old value first.
        * cfg.c (clear_bb_flags): Don't clear partition setting.
        * ifcvt.c (find_if_case_1): Remove ??? comment.
index 7fc47ba..74f8be6 100644 (file)
@@ -104,7 +104,7 @@ init_c_lex (void)
 
   /* Set the debug callbacks if we can use them.  */
   if (debug_info_level == DINFO_LEVEL_VERBOSE
-      && (write_symbols == DWARF_DEBUG || write_symbols == DWARF2_DEBUG
+      && (write_symbols == DWARF2_DEBUG
           || write_symbols == VMS_AND_DWARF2_DEBUG))
     {
       cb->define = cb_define;
index 50f5e59..25db5ec 100644 (file)
@@ -2712,8 +2712,7 @@ cris_override_options (void)
       flag_no_function_cse = 1;
     }
 
-  if ((write_symbols == DWARF_DEBUG
-       || write_symbols == DWARF2_DEBUG) && ! TARGET_ELF)
+  if (write_symbols == DWARF2_DEBUG && ! TARGET_ELF)
     {
       warning ("that particular -g option is invalid with -maout and -melinux");
       write_symbols = DBX_DEBUG;
index ccc26cf..7bd22f2 100644 (file)
@@ -502,11 +502,6 @@ frv_override_options (void)
        }
     }
 
-  /* Both -fpic and -gdwarf want to use .previous and the assembler only keeps
-     one level.  */
-  if (write_symbols == DWARF_DEBUG && flag_pic)
-    error ("-fpic and -gdwarf are incompatible (-fpic and -g/-gdwarf-2 are fine)");
-
   /* Change the branch cost value.  */
   if (frv_branch_cost_string)
     frv_branch_cost_int = atoi (frv_branch_cost_string);
index c249661..5f6cc48 100644 (file)
@@ -778,8 +778,7 @@ do {                                                                        \
         but gdb doesn't implement this yet */                          \
      if (0)                                                            \
       flag_omit_frame_pointer                                          \
-        = (PREFERRED_DEBUGGING_TYPE == DWARF_DEBUG                     \
-          || PREFERRED_DEBUGGING_TYPE == DWARF2_DEBUG);                \
+        = (PREFERRED_DEBUGGING_TYPE == DWARF2_DEBUG);                  \
      else                                                              \
       flag_omit_frame_pointer = 0;                                     \
    }                                                                   \
index 8a23b73..d654d65 100644 (file)
@@ -1,3 +1,7 @@
+2004-08-25  Zack Weinberg  <zack@codesourcery.com>
+
+       * class.c, search.c: Remove references to DWARF_DEBUG.
+
 2004-08-25  Adam Nemet  <anemet@lnxw.com>
 
        * repo.c (extract_string): Reset backquote after one character.
index c729414..e17a438 100644 (file)
@@ -636,7 +636,7 @@ build_vtable (tree class_type, tree name, tree vtable_type)
   DECL_EXTERNAL (decl) = 1;
   DECL_NOT_REALLY_EXTERN (decl) = 1;
 
-  if (write_symbols == DWARF_DEBUG || write_symbols == DWARF2_DEBUG)
+  if (write_symbols == DWARF2_DEBUG)
     /* Mark the VAR_DECL node representing the vtable itself as a
        "gratuitous" one, thereby forcing dwarfout.c to ignore it.  It
        is rather important that such things be ignored because any
index 4aadf78..1c52a94 100644 (file)
@@ -1965,15 +1965,7 @@ dfs_unmark (tree binfo, void *data ATTRIBUTE_UNUSED)
 void
 maybe_suppress_debug_info (tree t)
 {
-  /* We can't do the usual TYPE_DECL_SUPPRESS_DEBUG thing with DWARF, which
-     does not support name references between translation units.  It supports
-     symbolic references between translation units, but only within a single
-     executable or shared library.
-
-     For DWARF 2, we handle TYPE_DECL_SUPPRESS_DEBUG by pretending
-     that the type was never defined, so we only get the members we
-     actually define.  */
-  if (write_symbols == DWARF_DEBUG || write_symbols == NO_DEBUG)
+  if (write_symbols == NO_DEBUG)
     return;
 
   /* We might have set this earlier in cp_finish_decl.  */
index 7f110d6..d16adf4 100644 (file)
@@ -535,38 +535,34 @@ do { fputs (integer_asm_op (POINTER_SIZE / BITS_PER_UNIT, TRUE), FILE); \
 #endif
 
 /* If more than one debugging type is supported, you must define
-   PREFERRED_DEBUGGING_TYPE to choose a format in a system-dependent way.
+   PREFERRED_DEBUGGING_TYPE to choose the default.  */
 
-   This is one long line cause VAXC can't handle a \-newline.  */
-#if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO) + defined (VMS_DEBUGGING_INFO))
+#if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) \
+         + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO) \
+         + defined (VMS_DEBUGGING_INFO))
 #ifndef PREFERRED_DEBUGGING_TYPE
-You Lose!  You must define PREFERRED_DEBUGGING_TYPE!
+#error You must define PREFERRED_DEBUGGING_TYPE
 #endif /* no PREFERRED_DEBUGGING_TYPE */
-#else /* Only one debugging format supported.  Define PREFERRED_DEBUGGING_TYPE
-        so other code needn't care.  */
-#ifdef DBX_DEBUGGING_INFO
+
+/* If only one debugging format is supported, define PREFERRED_DEBUGGING_TYPE
+   here so other code needn't care.  */
+#elif defined DBX_DEBUGGING_INFO
 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
-#endif
-#ifdef SDB_DEBUGGING_INFO
+
+#elif defined SDB_DEBUGGING_INFO
 #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
-#endif
-#ifdef DWARF_DEBUGGING_INFO
-#define PREFERRED_DEBUGGING_TYPE DWARF_DEBUG
-#endif
-#ifdef DWARF2_DEBUGGING_INFO
+
+#elif defined DWARF2_DEBUGGING_INFO
 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
-#endif
-#ifdef VMS_DEBUGGING_INFO
+
+#elif defined VMS_DEBUGGING_INFO
 #define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG
-#endif
-#ifdef XCOFF_DEBUGGING_INFO
+
+#elif defined XCOFF_DEBUGGING_INFO
 #define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG
-#endif
-#endif /* More than one debugger format enabled.  */
 
-/* If still not defined, must have been because no debugging formats
-   are supported.  */
-#ifndef PREFERRED_DEBUGGING_TYPE
+#else
+/* No debugging format is supported by this target.  */
 #define PREFERRED_DEBUGGING_TYPE NO_DEBUG
 #endif
 
index 0da4075..e107189 100644 (file)
@@ -3115,7 +3115,7 @@ either your program or GCC:
 @item -g
 @opindex g
 Produce debugging information in the operating system's native format
-(stabs, COFF, XCOFF, or DWARF)@.  GDB can work with this debugging
+(stabs, COFF, XCOFF, or DWARF 2)@.  GDB can work with this debugging
 information.
 
 On most systems that use stabs format, @option{-g} enables use of extra
@@ -3126,7 +3126,7 @@ refuse to read the program.  If you want to control for certain whether
 to generate the extra information, use @option{-gstabs+}, @option{-gstabs},
 @option{-gxcoff+}, @option{-gxcoff}, or @option{-gvms} (see below).
 
-Unlike most other C compilers, GCC allows you to use @option{-g} with
+GCC allows you to use @option{-g} with
 @option{-O}.  The shortcuts taken by optimized code may occasionally
 produce surprising results: some variables you declared may not exist
 at all; flow of control may briefly move where you did not expect it;
@@ -3189,7 +3189,10 @@ assembler (GAS) to fail with an error.
 @item -gdwarf-2
 @opindex gdwarf-2
 Produce debugging information in DWARF version 2 format (if that is
-supported).  This is the format used by DBX on IRIX 6.
+supported).  This is the format used by DBX on IRIX 6.  With this
+option, GCC uses features of DWARF version 3 when they are useful;
+version 3 is upward compatible with version 2, but may still cause
+problems for older debuggers.
 
 @item -gvms
 @opindex gvms
@@ -3214,10 +3217,13 @@ Level 3 includes extra information, such as all the macro definitions
 present in the program.  Some debuggers support macro expansion when
 you use @option{-g3}.
 
-Note that in order to avoid confusion between DWARF1 debug level 2,
-and DWARF2 @option{-gdwarf-2} does not accept a concatenated debug
-level.  Instead use an additional @option{-g@var{level}} option to
-change the debug level for DWARF2.
+@option{-gdwarf-2} does not accept a concatenated debug level, because
+GCC used to support an option @option{-gdwarf} that meant to generate
+debug information in version 1 of the DWARF format (which is very
+different from version 2), and it would have been too confusing.  That
+debug format is long obsolete, but the option cannot be changed now.
+Instead use an additional @option{-g@var{level}} option to change the
+debug level for DWARF2.
 
 @item -feliminate-dwarf2-dups
 @opindex feliminate-dwarf2-dups
index a59f3a2..5b67678 100644 (file)
@@ -1793,7 +1793,6 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
        case NOTE_INSN_BLOCK_BEG:
          if (debug_info_level == DINFO_LEVEL_NORMAL
              || debug_info_level == DINFO_LEVEL_VERBOSE
-             || write_symbols == DWARF_DEBUG
              || write_symbols == DWARF2_DEBUG
              || write_symbols == VMS_AND_DWARF2_DEBUG
              || write_symbols == VMS_DEBUG)
@@ -1815,7 +1814,6 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
        case NOTE_INSN_BLOCK_END:
          if (debug_info_level == DINFO_LEVEL_NORMAL
              || debug_info_level == DINFO_LEVEL_VERBOSE
-             || write_symbols == DWARF_DEBUG
              || write_symbols == DWARF2_DEBUG
              || write_symbols == VMS_AND_DWARF2_DEBUG
              || write_symbols == VMS_DEBUG)
index 542a53f..c0fcc3c 100644 (file)
@@ -30,7 +30,6 @@ enum debug_info_type
   NO_DEBUG,        /* Write no debug info.  */
   DBX_DEBUG,       /* Write BSD .stabs for DBX (using dbxout.c).  */
   SDB_DEBUG,       /* Write COFF for (old) SDB (using sdbout.c).  */
-  DWARF_DEBUG,     /* Write Dwarf debug info (using dwarfout.c).  */
   DWARF2_DEBUG,            /* Write Dwarf v2 debug info (using dwarf2out.c).  */
   XCOFF_DEBUG,     /* Write IBM/Xcoff debug info (using dbxout.c).  */
   VMS_DEBUG,        /* Write VMS debug info (using vmsdbgout.c).  */
index a6a7c33..b802bcf 100644 (file)
@@ -647,9 +647,7 @@ decode_options (unsigned int argc, const char **argv)
      work correctly with DWARF debugging turned on.  Until this is fixed
      we will disable the optimization when DWARF debugging is set.  */
   
-  if (flag_reorder_blocks_and_partition
-      && (write_symbols == DWARF_DEBUG
-         || write_symbols == DWARF2_DEBUG))
+  if (flag_reorder_blocks_and_partition && write_symbols == DWARF2_DEBUG)
     {
       warning
        ("-freorder-blocks-and-partition does not work with -g (currently)");