Commit f8ca7e49 by Zack Weinberg Committed by Zack Weinberg

flags.h (enum debug_info_type): Remove DWARF_DEBUG.

	* 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.
cp:
	* class.c, search.c: Remove references to DWARF_DEBUG.

From-SVN: r86540
parent 69b9b0d2
2004-08-25 Zack Weinberg <zack@codesourcery.com> 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. * basic-block.h (BB_SET_PARTITION): Clear old value first.
* cfg.c (clear_bb_flags): Don't clear partition setting. * cfg.c (clear_bb_flags): Don't clear partition setting.
* ifcvt.c (find_if_case_1): Remove ??? comment. * ifcvt.c (find_if_case_1): Remove ??? comment.
......
...@@ -104,7 +104,7 @@ init_c_lex (void) ...@@ -104,7 +104,7 @@ init_c_lex (void)
/* Set the debug callbacks if we can use them. */ /* Set the debug callbacks if we can use them. */
if (debug_info_level == DINFO_LEVEL_VERBOSE 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)) || write_symbols == VMS_AND_DWARF2_DEBUG))
{ {
cb->define = cb_define; cb->define = cb_define;
......
...@@ -2712,8 +2712,7 @@ cris_override_options (void) ...@@ -2712,8 +2712,7 @@ cris_override_options (void)
flag_no_function_cse = 1; flag_no_function_cse = 1;
} }
if ((write_symbols == DWARF_DEBUG if (write_symbols == DWARF2_DEBUG && ! TARGET_ELF)
|| write_symbols == DWARF2_DEBUG) && ! TARGET_ELF)
{ {
warning ("that particular -g option is invalid with -maout and -melinux"); warning ("that particular -g option is invalid with -maout and -melinux");
write_symbols = DBX_DEBUG; write_symbols = DBX_DEBUG;
......
...@@ -502,11 +502,6 @@ frv_override_options (void) ...@@ -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. */ /* Change the branch cost value. */
if (frv_branch_cost_string) if (frv_branch_cost_string)
frv_branch_cost_int = atoi (frv_branch_cost_string); frv_branch_cost_int = atoi (frv_branch_cost_string);
......
...@@ -778,8 +778,7 @@ do { \ ...@@ -778,8 +778,7 @@ do { \
but gdb doesn't implement this yet */ \ but gdb doesn't implement this yet */ \
if (0) \ if (0) \
flag_omit_frame_pointer \ flag_omit_frame_pointer \
= (PREFERRED_DEBUGGING_TYPE == DWARF_DEBUG \ = (PREFERRED_DEBUGGING_TYPE == DWARF2_DEBUG); \
|| PREFERRED_DEBUGGING_TYPE == DWARF2_DEBUG); \
else \ else \
flag_omit_frame_pointer = 0; \ flag_omit_frame_pointer = 0; \
} \ } \
......
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> 2004-08-25 Adam Nemet <anemet@lnxw.com>
* repo.c (extract_string): Reset backquote after one character. * repo.c (extract_string): Reset backquote after one character.
......
...@@ -636,7 +636,7 @@ build_vtable (tree class_type, tree name, tree vtable_type) ...@@ -636,7 +636,7 @@ build_vtable (tree class_type, tree name, tree vtable_type)
DECL_EXTERNAL (decl) = 1; DECL_EXTERNAL (decl) = 1;
DECL_NOT_REALLY_EXTERN (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 /* Mark the VAR_DECL node representing the vtable itself as a
"gratuitous" one, thereby forcing dwarfout.c to ignore it. It "gratuitous" one, thereby forcing dwarfout.c to ignore it. It
is rather important that such things be ignored because any is rather important that such things be ignored because any
......
...@@ -1965,15 +1965,7 @@ dfs_unmark (tree binfo, void *data ATTRIBUTE_UNUSED) ...@@ -1965,15 +1965,7 @@ dfs_unmark (tree binfo, void *data ATTRIBUTE_UNUSED)
void void
maybe_suppress_debug_info (tree t) maybe_suppress_debug_info (tree t)
{ {
/* We can't do the usual TYPE_DECL_SUPPRESS_DEBUG thing with DWARF, which if (write_symbols == NO_DEBUG)
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)
return; return;
/* We might have set this earlier in cp_finish_decl. */ /* We might have set this earlier in cp_finish_decl. */
......
...@@ -535,38 +535,34 @@ do { fputs (integer_asm_op (POINTER_SIZE / BITS_PER_UNIT, TRUE), FILE); \ ...@@ -535,38 +535,34 @@ do { fputs (integer_asm_op (POINTER_SIZE / BITS_PER_UNIT, TRUE), FILE); \
#endif #endif
/* If more than one debugging type is supported, you must define /* 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) \
#if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO) + defined (VMS_DEBUGGING_INFO)) + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO) \
+ defined (VMS_DEBUGGING_INFO))
#ifndef PREFERRED_DEBUGGING_TYPE #ifndef PREFERRED_DEBUGGING_TYPE
You Lose! You must define PREFERRED_DEBUGGING_TYPE! #error You must define PREFERRED_DEBUGGING_TYPE
#endif /* no PREFERRED_DEBUGGING_TYPE */ #endif /* no PREFERRED_DEBUGGING_TYPE */
#else /* Only one debugging format supported. Define PREFERRED_DEBUGGING_TYPE
so other code needn't care. */ /* If only one debugging format is supported, define PREFERRED_DEBUGGING_TYPE
#ifdef DBX_DEBUGGING_INFO here so other code needn't care. */
#elif defined DBX_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
#endif
#ifdef SDB_DEBUGGING_INFO #elif defined SDB_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE SDB_DEBUG #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
#endif
#ifdef DWARF_DEBUGGING_INFO #elif defined DWARF2_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE DWARF_DEBUG
#endif
#ifdef DWARF2_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
#endif
#ifdef VMS_DEBUGGING_INFO #elif defined VMS_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG #define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG
#endif
#ifdef XCOFF_DEBUGGING_INFO #elif defined XCOFF_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG #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 #else
are supported. */ /* No debugging format is supported by this target. */
#ifndef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE NO_DEBUG #define PREFERRED_DEBUGGING_TYPE NO_DEBUG
#endif #endif
......
...@@ -3115,7 +3115,7 @@ either your program or GCC: ...@@ -3115,7 +3115,7 @@ either your program or GCC:
@item -g @item -g
@opindex g @opindex g
Produce debugging information in the operating system's native format 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. information.
On most systems that use stabs format, @option{-g} enables use of extra 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 ...@@ -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}, to generate the extra information, use @option{-gstabs+}, @option{-gstabs},
@option{-gxcoff+}, @option{-gxcoff}, or @option{-gvms} (see below). @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 @option{-O}. The shortcuts taken by optimized code may occasionally
produce surprising results: some variables you declared may not exist produce surprising results: some variables you declared may not exist
at all; flow of control may briefly move where you did not expect it; 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. ...@@ -3189,7 +3189,10 @@ assembler (GAS) to fail with an error.
@item -gdwarf-2 @item -gdwarf-2
@opindex gdwarf-2 @opindex gdwarf-2
Produce debugging information in DWARF version 2 format (if that is 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 @item -gvms
@opindex gvms @opindex gvms
...@@ -3214,10 +3217,13 @@ Level 3 includes extra information, such as all the macro definitions ...@@ -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 present in the program. Some debuggers support macro expansion when
you use @option{-g3}. you use @option{-g3}.
Note that in order to avoid confusion between DWARF1 debug level 2, @option{-gdwarf-2} does not accept a concatenated debug level, because
and DWARF2 @option{-gdwarf-2} does not accept a concatenated debug GCC used to support an option @option{-gdwarf} that meant to generate
level. Instead use an additional @option{-g@var{level}} option to debug information in version 1 of the DWARF format (which is very
change the debug level for DWARF2. 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 @item -feliminate-dwarf2-dups
@opindex feliminate-dwarf2-dups @opindex feliminate-dwarf2-dups
......
...@@ -1793,7 +1793,6 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED, ...@@ -1793,7 +1793,6 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
case NOTE_INSN_BLOCK_BEG: case NOTE_INSN_BLOCK_BEG:
if (debug_info_level == DINFO_LEVEL_NORMAL if (debug_info_level == DINFO_LEVEL_NORMAL
|| debug_info_level == DINFO_LEVEL_VERBOSE || debug_info_level == DINFO_LEVEL_VERBOSE
|| write_symbols == DWARF_DEBUG
|| write_symbols == DWARF2_DEBUG || write_symbols == DWARF2_DEBUG
|| write_symbols == VMS_AND_DWARF2_DEBUG || write_symbols == VMS_AND_DWARF2_DEBUG
|| write_symbols == VMS_DEBUG) || write_symbols == VMS_DEBUG)
...@@ -1815,7 +1814,6 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED, ...@@ -1815,7 +1814,6 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
case NOTE_INSN_BLOCK_END: case NOTE_INSN_BLOCK_END:
if (debug_info_level == DINFO_LEVEL_NORMAL if (debug_info_level == DINFO_LEVEL_NORMAL
|| debug_info_level == DINFO_LEVEL_VERBOSE || debug_info_level == DINFO_LEVEL_VERBOSE
|| write_symbols == DWARF_DEBUG
|| write_symbols == DWARF2_DEBUG || write_symbols == DWARF2_DEBUG
|| write_symbols == VMS_AND_DWARF2_DEBUG || write_symbols == VMS_AND_DWARF2_DEBUG
|| write_symbols == VMS_DEBUG) || write_symbols == VMS_DEBUG)
......
...@@ -30,7 +30,6 @@ enum debug_info_type ...@@ -30,7 +30,6 @@ enum debug_info_type
NO_DEBUG, /* Write no debug info. */ NO_DEBUG, /* Write no debug info. */
DBX_DEBUG, /* Write BSD .stabs for DBX (using dbxout.c). */ DBX_DEBUG, /* Write BSD .stabs for DBX (using dbxout.c). */
SDB_DEBUG, /* Write COFF for (old) SDB (using sdbout.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). */ DWARF2_DEBUG, /* Write Dwarf v2 debug info (using dwarf2out.c). */
XCOFF_DEBUG, /* Write IBM/Xcoff debug info (using dbxout.c). */ XCOFF_DEBUG, /* Write IBM/Xcoff debug info (using dbxout.c). */
VMS_DEBUG, /* Write VMS debug info (using vmsdbgout.c). */ VMS_DEBUG, /* Write VMS debug info (using vmsdbgout.c). */
......
...@@ -647,9 +647,7 @@ decode_options (unsigned int argc, const char **argv) ...@@ -647,9 +647,7 @@ decode_options (unsigned int argc, const char **argv)
work correctly with DWARF debugging turned on. Until this is fixed work correctly with DWARF debugging turned on. Until this is fixed
we will disable the optimization when DWARF debugging is set. */ we will disable the optimization when DWARF debugging is set. */
if (flag_reorder_blocks_and_partition if (flag_reorder_blocks_and_partition && write_symbols == DWARF2_DEBUG)
&& (write_symbols == DWARF_DEBUG
|| write_symbols == DWARF2_DEBUG))
{ {
warning warning
("-freorder-blocks-and-partition does not work with -g (currently)"); ("-freorder-blocks-and-partition does not work with -g (currently)");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment