summaryrefslogtreecommitdiff
path: root/gcc/dbxout.c
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-21 17:22:01 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-21 17:22:01 +0000
commit52cae7bfd8f8df4aabad75705c4d209587d2ddc3 (patch)
tree3f7c38c992bb23c2107b7821ad4f09e8256e9c94 /gcc/dbxout.c
parent860e55323a23357a9969ff48ce995bc6a2cd1417 (diff)
downloadgcc-52cae7bfd8f8df4aabad75705c4d209587d2ddc3.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89387 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dbxout.c')
-rw-r--r--gcc/dbxout.c81
1 files changed, 29 insertions, 52 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index 9f8c37aefb0..077cc498a32 100644
--- a/gcc/dbxout.c
+++ b/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,21 +520,26 @@ 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);
+ DBX_OUTPUT_MAIN_SOURCE_DIRECTORY (asm_out_file, cwd);
#else /* no DBX_OUTPUT_MAIN_SOURCE_DIRECTORY */
- fprintf (asm_out_file, "%s", ASM_STABS_OP);
- output_quoted_string (asm_out_file, cwd);
- fprintf (asm_out_file, ",%d,0,%d,", N_SO, get_lang_number ());
- assemble_name (asm_out_file, ltext_label_name);
- fputc ('\n', asm_out_file);
+ fprintf (asm_out_file, "%s", ASM_STABS_OP);
+ output_quoted_string (asm_out_file, cwd);
+ fprintf (asm_out_file, ",%d,0,%d,", N_SO, get_lang_number ());
+ assemble_name (asm_out_file, ltext_label_name);
+ fputc ('\n', asm_out_file);
#endif /* no DBX_OUTPUT_MAIN_SOURCE_DIRECTORY */
- }
}
#ifdef DBX_OUTPUT_MAIN_SOURCE_FILENAME
@@ -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