This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Janitor] Remove unused DBX_* tests
- From: Andreas Jaeger <aj at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 30 May 2003 22:18:48 +0200
- Subject: [Janitor] Remove unused DBX_* tests
Some DBX_* defines are nowhere defined, here's a patch to remove them.
Ok to commit if bootstrap passes on i686-linux-gnu?
Andreas
2003-05-30 Andreas Jaeger <aj@suse.de>
* dbxout.c (dbxout_type): Remove usage of DBX_OUTPUT_ENUM.
(dbxout_symbol): Remove usage of DBX_OUTPUT_CONSTANT_SYMBOL.
(dbxout_block): Remove usage of DBX_OUTPUT_CATCH.
(dbxout_block): Remove usage of DBX_LBRAC_FIRST.
(dbxout_source_file): Remove usage of DBX_OUTPUT_SOURCE_FILENAME.
(dbxout_init): Remove test for DBX_WORKING_DIRECTORY.
* config/d30v/d30v.h: Remove comments for DBX_LBRAC_FIRST,
DBX_OUTPUT_SOURCE_FILENAME, DBX_OUTPUT_ENUM and
DBX_WORKING_DIRECTORY.
* doc/tm.texi (DBX Options): Do not document DBX_LBRAC_FIRST,
DBX_OUTPUT_SOURCE_FILENAME and DBX_OUTPUT_ENUM and
DBX_WORKING_DIRECTORY.
* system.h: Poison DBX_LBRAC_FIRST, DBX_OUTPUT_ENUM,
DBX_OUTPUT_SOURCE_FILENAME and DBX_WORKING_DIRECTORY.
============================================================
Index: gcc/dbxout.c
--- gcc/dbxout.c 17 May 2003 01:40:38 -0000 1.139
+++ gcc/dbxout.c 30 May 2003 20:16:59 -0000
@@ -439,10 +439,7 @@ dbxout_init (input_file_name)
ASM_GENERATE_INTERNAL_LABEL (ltext_label_name, "Ltext", 0);
/* Put the current working directory in an N_SO symbol. */
-#ifndef DBX_WORKING_DIRECTORY /* Only some versions of DBX want this,
- but GDB always does. */
if (use_gnu_debug_info_extensions)
-#endif
{
if (!cwd && (cwd = getpwd ()) && (!*cwd || cwd[strlen (cwd) - 1] != '/'))
cwd = concat (cwd, FILE_NAME_JOINER, NULL);
@@ -461,8 +458,6 @@ dbxout_init (input_file_name)
}
#ifdef DBX_OUTPUT_MAIN_SOURCE_FILENAME
- /* This should NOT be DBX_OUTPUT_SOURCE_FILENAME. That
- would give us an N_SOL, and we want an N_SO. */
DBX_OUTPUT_MAIN_SOURCE_FILENAME (asmfile, input_file_name);
#else /* no DBX_OUTPUT_MAIN_SOURCE_FILENAME */
/* We include outputting `Ltext:' here,
@@ -612,9 +607,6 @@ dbxout_source_file (file, filename)
if (filename && (lastfile == 0 || strcmp (filename, lastfile)))
{
-#ifdef DBX_OUTPUT_SOURCE_FILENAME
- DBX_OUTPUT_SOURCE_FILENAME (file, filename);
-#else
char ltext_label_name[100];
ASM_GENERATE_INTERNAL_LABEL (ltext_label_name, "Ltext",
@@ -631,7 +623,6 @@ dbxout_source_file (file, filename)
text_section ();
(*targetm.asm_out.internal_label) (file, "Ltext", source_label_number);
source_label_number++;
-#endif
lastfile = filename;
}
}
@@ -1720,9 +1711,6 @@ dbxout_type (type, full)
CHARS (1);
return;
}
-#ifdef DBX_OUTPUT_ENUM
- DBX_OUTPUT_ENUM (asmfile, type);
-#else
if (use_gnu_debug_info_extensions
&& TYPE_PRECISION (type) != TYPE_PRECISION (integer_type_node))
{
@@ -1752,7 +1740,6 @@ dbxout_type (type, full)
putc (';', asmfile);
CHARS (1);
-#endif
break;
case POINTER_TYPE:
@@ -2250,13 +2237,9 @@ dbxout_symbol (decl, local)
|| TREE_CODE (TREE_TYPE (decl)) == ENUMERAL_TYPE)
{
HOST_WIDE_INT ival = tree_low_cst (DECL_INITIAL (decl), 0);
-#ifdef DBX_OUTPUT_CONSTANT_SYMBOL
- DBX_OUTPUT_CONSTANT_SYMBOL (asmfile, name, ival);
-#else
fprintf (asmfile, "%s\"%s:c=i" HOST_WIDE_INT_PRINT_DEC
"\",0x%x,0,0,0\n",
ASM_STABS_OP, name, ival, N_LSYM);
-#endif
return 1;
}
else if (TREE_CODE (TREE_TYPE (decl)) == REAL_TYPE)
@@ -2968,9 +2951,6 @@ dbxout_block (block, depth, args)
{
int did_output;
-#ifdef DBX_LBRAC_FIRST
- did_output = 1;
-#else
/* In dbx format, the syms of a block come before the N_LBRAC.
If nothing is output, we don't need the N_LBRAC, either. */
did_output = 0;
@@ -2978,7 +2958,6 @@ dbxout_block (block, depth, args)
did_output = dbxout_syms (BLOCK_VARS (block));
if (args)
dbxout_reg_parms (args);
-#endif
/* Now output an N_LBRAC symbol to represent the beginning of
the block. Use the block's tree-walk order to generate
@@ -2996,14 +2975,10 @@ dbxout_block (block, depth, args)
tree decl = BLOCK_VARS (block);
while (decl)
{
-#ifdef DBX_OUTPUT_CATCH
- DBX_OUTPUT_CATCH (asmfile, decl, buf);
-#else
fprintf (asmfile, "%s\"%s:C1\",%d,0,0,", ASM_STABS_OP,
IDENTIFIER_POINTER (DECL_NAME (decl)), N_CATCH);
assemble_name (asmfile, buf);
fprintf (asmfile, "\n");
-#endif
decl = TREE_CHAIN (decl);
}
}
@@ -3020,15 +2995,6 @@ dbxout_block (block, depth, args)
fprintf (asmfile, "\n");
#endif
}
-
-#ifdef DBX_LBRAC_FIRST
- /* On some weird machines, the syms of a block
- come after the N_LBRAC. */
- if (debug_info_level != DINFO_LEVEL_TERSE || depth == 0)
- dbxout_syms (BLOCK_VARS (block));
- if (args)
- dbxout_reg_parms (args);
-#endif
/* Output the subblocks. */
dbxout_block (BLOCK_SUBBLOCKS (block), depth + 1, NULL_TREE);
============================================================
Index: gcc/system.h
--- gcc/system.h 17 May 2003 21:59:25 -0000 1.146
+++ gcc/system.h 30 May 2003 20:16:59 -0000
@@ -640,7 +640,8 @@ typedef char _Bool;
BLOCK_PROFILER BLOCK_PROFILER_CODE FUNCTION_BLOCK_PROFILER \
FUNCTION_BLOCK_PROFILER_EXIT MACHINE_STATE_SAVE \
MACHINE_STATE_RESTORE SCCS_DIRECTIVE SECTION_ASM_OP \
- ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL ASM_OUTPUT_INTERNAL_LABEL
+ ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL ASM_OUTPUT_INTERNAL_LABEL\
+ DBX_LBRAC_FIRST DBX_OUTPUT_ENUM DBX_OUTPUT_SOURCE_FILENAME \
+ DBX_WORKING_DIRECTORY
/* Hooks that are no longer used. */
#pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE \
============================================================
Index: gcc/config/d30v/d30v.h
--- config/d30v/d30v.h 29 May 2003 21:13:34 -0000 1.82
+++ config/d30v/d30v.h 30 May 2003 20:17:02 -0000
@@ -1,5 +1,5 @@
/* Definitions of target machine for Mitsubishi D30V.
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
@@ -3620,11 +3601,6 @@ fprintf (STREAM, "\t.word .L%d\n", VALUE
Defined in svr4.h. */
/* #define DBX_FUNCTION_FIRST */
-/* Define this macro if the `N_LBRAC' symbol for a block should precede the
- debugging information for variables and functions defined in that block.
- Normally, in DBX format, the `N_LBRAC' symbol comes first. */
-/* #define DBX_LBRAC_FIRST */
-
/* Define this macro if the value of a symbol describing the scope of a block
(`N_LBRAC' or `N_RBRAC') should be relative to the start of the enclosing
function. Normally, GNU C uses an absolute address.
@@ -3652,12 +3628,6 @@ fprintf (STREAM, "\t.word .L%d\n", VALUE
/* Like `DBX_OUTPUT_LBRAC', but for the end of a scope level. */
/* #define DBX_OUTPUT_RBRAC(STREAM, NAME) */
-/* Define this macro if the target machine requires special handling to output
- an enumeration type. The definition should be a C statement (sans
- semicolon) to output the appropriate information to STREAM for the type
- TYPE. */
-/* #define DBX_OUTPUT_ENUM(STREAM, TYPE) */
-
/* Define this macro if the target machine requires special output at the end
of the debugging information for a function. The definition should be a C
statement (sans semicolon) to output the appropriate information to STREAM.
@@ -3738,15 +3708,6 @@ fprintf (STREAM, "\t.word .L%d\n", VALUE
If you don't define this macro, nothing special is output at the end of
compilation, which is correct for most machines. */
/* #define DBX_OUTPUT_MAIN_SOURCE_FILE_END(STREAM, NAME) */
-
-/* A C statement to output DBX debugging information to the stdio stream STREAM
- which indicates that file NAME is the current source file. This output is
- generated each time input shifts to a different source file as a result of
- `#include', the end of an included file, or a `#line' command.
-
- This macro need not be defined if the standard form of output for DBX
- debugging information is appropriate. */
-/* #define DBX_OUTPUT_SOURCE_FILENAME(STREAM, NAME) */
/* Macros for SDB and Dwarf Output. */
============================================================
Index: gcc/doc/tm.texi
--- doc/tm.texi 29 May 2003 21:13:33 -0000 1.223
+++ doc/tm.texi 30 May 2003 20:17:07 -0000
@@ -7960,13 +7954,6 @@ arguments should precede the assembler c
in DBX format, the debugging information entirely follows the assembler
code.
-@findex DBX_LBRAC_FIRST
-@item DBX_LBRAC_FIRST
-Define this macro if the @code{N_LBRAC} symbol for a block should
-precede the debugging information for variables and functions defined in
-that block. Normally, in DBX format, the @code{N_LBRAC} symbol comes
-first.
-
@findex DBX_BLOCKS_FUNCTION_RELATIVE
@item DBX_BLOCKS_FUNCTION_RELATIVE
Define this macro if the value of a symbol describing the scope of a
@@ -8006,13 +7993,6 @@ Like @code{DBX_OUTPUT_LBRAC}, but for th
Define this macro if the target machine requires special handling to
output an @code{N_FUN} entry for the function @var{decl}.
-@findex DBX_OUTPUT_ENUM
-@item DBX_OUTPUT_ENUM (@var{stream}, @var{type})
-Define this macro if the target machine requires special handling to
-output an enumeration type. The definition should be a C statement
-(sans semicolon) to output the appropriate information to @var{stream}
-for the type @var{type}.
-
@findex DBX_OUTPUT_FUNCTION_END
@item DBX_OUTPUT_FUNCTION_END (@var{stream}, @var{function})
Define this macro if the target machine requires special output at the
@@ -8130,17 +8110,6 @@ compilation of the main source file @var
If you don't define this macro, nothing special is output at the end
of compilation, which is correct for most machines.
-
-@findex DBX_OUTPUT_SOURCE_FILENAME
-@item DBX_OUTPUT_SOURCE_FILENAME (@var{stream}, @var{name})
-A C statement to output DBX debugging information to the stdio stream
-@var{stream} which indicates that file @var{name} is the current source
-file. This output is generated each time input shifts to a different
-source file as a result of @samp{#include}, the end of an included file,
-or a @samp{#line} command.
-
-This macro need not be defined if the standard form of output
-for DBX debugging information is appropriate.
@end table
@need 2000
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj