dbxout.c: Remove unnecessary #undefs.
* dbxout.c: Remove unnecessary #undefs. (GDB_INV_REF_REGPARM_STABS_LETTER, DBX_MEMPARM_STABS_LETTER) (FILE_NAME_JOINER, STABS_GCC_MARKER): Remove; fold sole definition into use sites. (cwd): Make local to dbxout_init. (dbxout_init): Restructure cwd-using logic for clarity. Use IS_DIR_SEPARATOR. * xcoffout.h (DBX_OUTPUT_GCC_MARKER): Definition of STABS_GCC_MARKER folded in here. * system.h: Poison now-unused macros. * doc/tm.texi: Remove documentation of now-unused macros. From-SVN: r89387
This commit is contained in:
parent
3e6da82b7e
commit
ac746f1dbb
@ -1,3 +1,17 @@
|
||||
2004-10-21 Zack Weinberg <zack@codesourcery.com>
|
||||
|
||||
* dbxout.c: Remove unnecessary #undefs.
|
||||
(GDB_INV_REF_REGPARM_STABS_LETTER, DBX_MEMPARM_STABS_LETTER)
|
||||
(FILE_NAME_JOINER, STABS_GCC_MARKER): Remove; fold sole
|
||||
definition into use sites.
|
||||
(cwd): Make local to dbxout_init.
|
||||
(dbxout_init): Restructure cwd-using logic for clarity. Use
|
||||
IS_DIR_SEPARATOR.
|
||||
* xcoffout.h (DBX_OUTPUT_GCC_MARKER): Definition of
|
||||
STABS_GCC_MARKER folded in here.
|
||||
* system.h: Poison now-unused macros.
|
||||
* doc/tm.texi: Remove documentation of now-unused macros.
|
||||
|
||||
2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
|
||||
|
||||
PR c/17538
|
||||
|
69
gcc/dbxout.c
69
gcc/dbxout.c
@ -93,12 +93,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
#include "xcoffout.h"
|
||||
#endif
|
||||
|
||||
#undef DBXOUT_DECR_NESTING
|
||||
#define DBXOUT_DECR_NESTING \
|
||||
if (--debug_nesting == 0 && symbol_queue_index > 0) \
|
||||
{ emit_pending_bincls_if_required (); debug_flush_symbol_queue (); }
|
||||
|
||||
#undef DBXOUT_DECR_NESTING_AND_RETURN
|
||||
#define DBXOUT_DECR_NESTING_AND_RETURN(x) \
|
||||
do {--debug_nesting; return (x);} while (0)
|
||||
|
||||
@ -126,26 +124,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
#define DBX_REGPARM_STABS_LETTER 'P'
|
||||
#endif
|
||||
|
||||
/* This is used for parameters passed by invisible reference in a register. */
|
||||
#ifndef GDB_INV_REF_REGPARM_STABS_LETTER
|
||||
#define GDB_INV_REF_REGPARM_STABS_LETTER 'a'
|
||||
#endif
|
||||
|
||||
#ifndef DBX_MEMPARM_STABS_LETTER
|
||||
#define DBX_MEMPARM_STABS_LETTER 'p'
|
||||
#endif
|
||||
|
||||
#ifndef FILE_NAME_JOINER
|
||||
#define FILE_NAME_JOINER "/"
|
||||
#endif
|
||||
|
||||
/* GDB needs to know that the stabs were generated by GCC. We emit an
|
||||
N_OPT stab at the beginning of the source file to indicate this.
|
||||
The string is historical, and different on a very few targets. */
|
||||
#ifndef STABS_GCC_MARKER
|
||||
#define STABS_GCC_MARKER "gcc2_compiled."
|
||||
#endif
|
||||
|
||||
#ifndef NO_DBX_FUNCTION_END
|
||||
#define NO_DBX_FUNCTION_END 0
|
||||
#endif
|
||||
@ -275,10 +253,6 @@ static int pending_bincls = 0;
|
||||
/* The original input file name. */
|
||||
static const char *base_input_file;
|
||||
|
||||
/* Current working directory. */
|
||||
|
||||
static const char *cwd;
|
||||
|
||||
#ifdef DEBUG_SYMS_TEXT
|
||||
#define FORCE_TEXT function_section (current_function_decl);
|
||||
#else
|
||||
@ -546,11 +520,17 @@ dbxout_init (const char *input_file_name)
|
||||
/* Put the current working directory in an N_SO symbol. */
|
||||
if (use_gnu_debug_info_extensions)
|
||||
{
|
||||
if (!cwd && (cwd = get_src_pwd ())
|
||||
&& (!*cwd || cwd[strlen (cwd) - 1] != '/'))
|
||||
cwd = concat (cwd, FILE_NAME_JOINER, NULL);
|
||||
if (cwd)
|
||||
static const char *cwd;
|
||||
|
||||
if (!cwd)
|
||||
{
|
||||
cwd = get_src_pwd ();
|
||||
if (cwd[0] == '\0')
|
||||
cwd = "/";
|
||||
else if (!IS_DIR_SEPARATOR (cwd[strlen (cwd) - 1]))
|
||||
cwd = concat (cwd, "/", NULL);
|
||||
}
|
||||
|
||||
#ifdef DBX_OUTPUT_MAIN_SOURCE_DIRECTORY
|
||||
DBX_OUTPUT_MAIN_SOURCE_DIRECTORY (asm_out_file, cwd);
|
||||
#else /* no DBX_OUTPUT_MAIN_SOURCE_DIRECTORY */
|
||||
@ -561,7 +541,6 @@ dbxout_init (const char *input_file_name)
|
||||
fputc ('\n', asm_out_file);
|
||||
#endif /* no DBX_OUTPUT_MAIN_SOURCE_DIRECTORY */
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DBX_OUTPUT_MAIN_SOURCE_FILENAME
|
||||
DBX_OUTPUT_MAIN_SOURCE_FILENAME (asm_out_file, input_file_name);
|
||||
@ -581,9 +560,10 @@ dbxout_init (const char *input_file_name)
|
||||
#ifdef DBX_OUTPUT_GCC_MARKER
|
||||
DBX_OUTPUT_GCC_MARKER (asm_out_file);
|
||||
#else
|
||||
/* Emit an N_OPT stab to indicate that this file was compiled by GCC. */
|
||||
fprintf (asm_out_file, "%s\"%s\",%d,0,0,0\n",
|
||||
ASM_STABS_OP, STABS_GCC_MARKER, N_OPT);
|
||||
/* Emit an N_OPT stab to indicate that this file was compiled by GCC.
|
||||
The string used is historical. */
|
||||
fprintf (asm_out_file, "%s\"gcc2_compiled.\",%d,0,0,0\n",
|
||||
ASM_STABS_OP, N_OPT);
|
||||
#endif
|
||||
|
||||
base_input_file = lastfile = input_file_name;
|
||||
@ -2865,16 +2845,13 @@ dbxout_parms (tree parms)
|
||||
if (DECL_NAME (parms))
|
||||
{
|
||||
current_sym_nchars = 2 + IDENTIFIER_LENGTH (DECL_NAME (parms));
|
||||
|
||||
fprintf (asm_out_file, "%s\"%s:%c", ASM_STABS_OP,
|
||||
IDENTIFIER_POINTER (DECL_NAME (parms)),
|
||||
DBX_MEMPARM_STABS_LETTER);
|
||||
fprintf (asm_out_file, "%s\"%s:p", ASM_STABS_OP,
|
||||
IDENTIFIER_POINTER (DECL_NAME (parms)));
|
||||
}
|
||||
else
|
||||
{
|
||||
current_sym_nchars = 8;
|
||||
fprintf (asm_out_file, "%s\"(anon):%c", ASM_STABS_OP,
|
||||
DBX_MEMPARM_STABS_LETTER);
|
||||
fprintf (asm_out_file, "%s\"(anon):p", ASM_STABS_OP);
|
||||
}
|
||||
|
||||
/* It is quite tempting to use:
|
||||
@ -2964,8 +2941,10 @@ dbxout_parms (tree parms)
|
||||
/* Parm passed in registers and lives in registers or nowhere. */
|
||||
|
||||
current_sym_code = DBX_REGPARM_STABS_CODE;
|
||||
|
||||
if (use_gnu_debug_info_extensions)
|
||||
regparm_letter = GDB_INV_REF_REGPARM_STABS_LETTER;
|
||||
/* GDB likes this marked with a special letter. */
|
||||
regparm_letter = 'a';
|
||||
else
|
||||
regparm_letter = DBX_REGPARM_STABS_LETTER;
|
||||
|
||||
@ -3065,15 +3044,13 @@ dbxout_parms (tree parms)
|
||||
current_sym_nchars
|
||||
= 2 + strlen (IDENTIFIER_POINTER (DECL_NAME (parms)));
|
||||
|
||||
fprintf (asm_out_file, "%s\"%s:%c", ASM_STABS_OP,
|
||||
IDENTIFIER_POINTER (DECL_NAME (parms)),
|
||||
DBX_MEMPARM_STABS_LETTER);
|
||||
fprintf (asm_out_file, "%s\"%s:p", ASM_STABS_OP,
|
||||
IDENTIFIER_POINTER (DECL_NAME (parms)));
|
||||
}
|
||||
else
|
||||
{
|
||||
current_sym_nchars = 8;
|
||||
fprintf (asm_out_file, "%s\"(anon):%c", ASM_STABS_OP,
|
||||
DBX_MEMPARM_STABS_LETTER);
|
||||
fprintf (asm_out_file, "%s\"(anon):p", ASM_STABS_OP);
|
||||
}
|
||||
|
||||
current_sym_value
|
||||
|
@ -7966,11 +7966,6 @@ passed in registers. DBX format does not customarily provide any way to
|
||||
do this. The default is @code{'P'}.
|
||||
@end defmac
|
||||
|
||||
@defmac DBX_MEMPARM_STABS_LETTER
|
||||
The letter to use in DBX symbol data to identify a symbol as a stack
|
||||
parameter. The default is @code{'p'}.
|
||||
@end defmac
|
||||
|
||||
@defmac DBX_FUNCTION_FIRST
|
||||
Define this macro if the DBX information for a function and its
|
||||
arguments should precede the assembler code for the function. Normally,
|
||||
|
@ -653,7 +653,10 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
|
||||
SUNOS4_SHARED_LIBRARIES PROMOTE_FOR_CALL_ONLY \
|
||||
SPACE_AFTER_L_OPTION NO_RECURSIVE_FUNCTION_CSE \
|
||||
DEFAULT_MAIN_RETURN TARGET_MEM_FUNCTIONS EXPAND_BUILTIN_VA_ARG \
|
||||
COLLECT_PARSE_FLAG DWARF2_GENERATE_TEXT_SECTION_LABEL
|
||||
COLLECT_PARSE_FLAG DWARF2_GENERATE_TEXT_SECTION_LABEL WINNING_GDB \
|
||||
ASM_OUTPUT_FILENAME ASM_OUTPUT_SOURCE_LINE FILE_NAME_JOINER \
|
||||
GDB_INV_REF_REGPARM_STABS_LETTER DBX_MEMPARM_STABS_LETTER \
|
||||
PUT_SDB_SRC_FILE STABS_GCC_MARKER
|
||||
|
||||
/* Hooks that are no longer used. */
|
||||
#pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE \
|
||||
|
@ -153,7 +153,7 @@ extern const char *xcoff_lastfile;
|
||||
/* .stabx has the type in a different place. */
|
||||
#if 0 /* Do not emit any marker for XCOFF until assembler allows XFT_CV. */
|
||||
#define DBX_OUTPUT_GCC_MARKER(FILE) \
|
||||
fprintf ((FILE), "%s\"%s\",0,%d,0\n", ASM_STABS_OP, STABS_GCC_MARKER, \
|
||||
fprintf ((FILE), "%s\"gcc2_compiled.\",0,%d,0\n", ASM_STABS_OP, \
|
||||
stab_to_sclass (N_GSYM))
|
||||
#else
|
||||
#define DBX_OUTPUT_GCC_MARKER(FILE)
|
||||
|
Loading…
Reference in New Issue
Block a user