-#define DBX_FINISH_SYMBOL(SYM) \
-{ \
- if (current_sym_addr && current_sym_code == N_FUN) \
- fprintf (asmfile, "\",."); \
- else \
- fprintf (asmfile, "\","); \
- /* If we are writing a function name, we must ensure that \
- there is no storage-class suffix on the name. */ \
- if (current_sym_addr && current_sym_code == N_FUN \
- && GET_CODE (current_sym_addr) == SYMBOL_REF) \
- { \
- const char *_p = XSTR (current_sym_addr, 0); \
- if (*_p == '*') \
- fprintf (asmfile, "%s", _p+1); \
- else \
- for (; *_p != '[' && *_p; _p++) \
- fprintf (asmfile, "%c", *_p); \
- } \
- else if (current_sym_addr) \
- output_addr_const (asmfile, current_sym_addr); \
- else if (current_sym_code == N_GSYM) \
- assemble_name (asmfile, XSTR (XEXP (DECL_RTL (sym), 0), 0)); \
- else \
- fprintf (asmfile, "%d", current_sym_value); \
- fprintf (asmfile, ",%d,0\n", stab_to_sclass (current_sym_code)); \
-}
+#define DBX_FINISH_STABS(SYM, CODE, LINE, ADDR, LABEL, NUMBER) do { \
+ if (ADDR) \
+ { \
+ /* If we are writing a function name, we must emit a dot in \
+ order to refer to the function code, not its descriptor. */ \
+ if (CODE == N_FUN) \
+ putc ('.', asm_out_file); \
+ \
+ /* If we are writing a function name, we must ensure that \
+ there is no storage-class suffix on the name. */ \
+ if (CODE == N_FUN && GET_CODE (ADDR) == SYMBOL_REF) \
+ { \
+ const char *_p = XSTR (ADDR, 0); \
+ if (*_p == '*') \
+ fputs (_p+1, asm_out_file); \
+ else \
+ for (; *_p != '[' && *_p; _p++) \
+ putc (*_p != '$' ? *_p : '_', asm_out_file); \
+ } \
+ else \
+ output_addr_const (asm_out_file, ADDR); \
+ } \
+ /* Another special case: N_GSYM always gets the symbol name, \
+ whether or not LABEL or NUMBER are set. */ \
+ else if (CODE == N_GSYM) \
+ assemble_name (asm_out_file, XSTR (XEXP (DECL_RTL (SYM), 0), 0)); \
+ else if (LABEL) \
+ assemble_name (asm_out_file, LABEL); \
+ else \
+ dbxout_int (NUMBER); \
+ putc (',', asm_out_file); \
+ dbxout_int (stab_to_sclass (CODE)); \
+ fputs (",0\n", asm_out_file); \
+} while (0)