#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)
#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
/* 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
/* 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
#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;
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:
/* 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;
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