Index: dbxout.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/dbxout.c,v retrieving revision 1.156 diff -u -p -u -p -r1.156 dbxout.c --- dbxout.c 19 Jul 2003 14:47:02 -0000 1.156 +++ dbxout.c 30 Jul 2003 00:58:19 -0000 @@ -2184,27 +2184,32 @@ dbxout_symbol (tree decl, int local ATTR || GET_CODE (XEXP (DECL_RTL (decl), 0)) != SYMBOL_REF) break; FORCE_TEXT; + + { + const char *gdb_name; - fprintf (asmfile, "%s\"%s:%c", ASM_STABS_OP, - IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)), - TREE_PUBLIC (decl) ? 'F' : 'f'); - result = 1; + /* Use the demangled version of the name. */ + gdb_name = lang_hooks.decl_printable_name (decl, 2); - current_sym_code = N_FUN; - current_sym_addr = XEXP (DECL_RTL (decl), 0); - - if (TREE_TYPE (type)) - dbxout_type (TREE_TYPE (type), 0); - else - dbxout_type (void_type_node, 0); - - /* For a nested function, when that function is compiled, - mention the containing function name - as well as (since dbx wants it) our own assembler-name. */ - if (context != 0) - fprintf (asmfile, ",%s,%s", - IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)), - IDENTIFIER_POINTER (DECL_NAME (context))); + fprintf (asmfile, "%s\"%s:%c", ASM_STABS_OP, gdb_name, + TREE_PUBLIC (decl) ? 'F' : 'f'); + result = 1; + + current_sym_code = N_FUN; + current_sym_addr = XEXP (DECL_RTL (decl), 0); + + if (TREE_TYPE (type)) + dbxout_type (TREE_TYPE (type), 0); + else + dbxout_type (void_type_node, 0); + + /* For a nested function, when that function is compiled, + mention the containing function name + as well as (since dbx wants it) our own name. */ + if (context != 0) + fprintf (asmfile, ",%s,%s", IDENTIFIER_POINTER (DECL_NAME (decl)), + IDENTIFIER_POINTER (DECL_NAME (context))); + } dbxout_finish_symbol (decl); break;