From 7a0c8d71088734946dd249184acb92f594ba9ddd Mon Sep 17 00:00:00 2001 From: Douglas B Rupp Date: Sun, 2 Dec 2001 09:38:07 -0500 Subject: vms.h (VMS_DEBUGGING_INFO): New macro. * config/alpha/vms.h (VMS_DEBUGGING_INFO): New macro. (PREFERRED_DEBUGGING_TYPE): Define as VMS_AND_DWARF2_DEBUG. (ASM_SPEC): Don't redefine. (OPTIMIZATION_OPTIONS, OVERRIDE_OPTIONS, LINK_SPEC): Define. * config/alpha/t-vms (EXTRA_PARTS): Use; add rule for vms-dwarf2.asm. * config/alpha/vms-dwarf2.asm: New file. * Makefile.in (OBJS): Add vmsdbgout.c and its rule. * c-lex.c (init_c_lex): Test for VMS_AND_DWARF2_DEBUG. * debug.h (gcc_debug_hooks): Add vmsdbg_debug_hooks. (vmsdbgout_after_prologue): New declaration. * defaults.h (VMS_DEBUGGING_INFO): Add to PREFERRED_DEBUGGING_TYPE. * dwarf2.h (dwarf_attribute): New DW_AT_VMS_rtnbeg_pd_address. * dwarf2out.c (dwarf2out_do_frame): Test for VMS_AND_DWARF2_DEBUG. (dwarf2out_frame_finish): Test for VMS_AND_DWARF2_DEBUG. (dwarf_attr_name): Use DW_AT_VMS_rtnbeg_pd_address. (add_name_and_src_coords_attributes): Test VMS_DEBUGGING_INFO * final.c (final_start_function): Test for VMS_AND_DWARF2_DEBUG. Test VMS_DEBUGGING_INFO. (final_end_function): Test for VMS_AND_DWARF2_DEBUG. (final_scan_insn): Test for VMS_AND_DWARF2_DEBUG and VMS_DEBUG. * flags.h (debug_info_type): Add VMS_DEBUG and VMS_AND_DWARF2_DEBUG. * toplev.c (compile_file): Test VMS_DEBUGGING_INFO, VMS_DEBUG, and VMS_AND_DWARF2_DEBUG. (rest_of_type_compilation): Test for VMS_AND_DWARF2_DEBUG. (decode_g_option): Add "vms" to debug_type_names. (process_options): Set vmsdbg_debug_hooks if -gvms. (lang_independent_init): Emit line number for VMS unless -g0. * tree.c: (build_complex_type): Test for VMS_AND_DWARF2_DEBUG. * vmsdbg.h, vmsdbgout.c: New files. From-SVN: r47532 --- gcc/dwarf2out.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'gcc/dwarf2out.c') diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 7d2ea7b..a103673 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -91,6 +91,7 @@ int dwarf2out_do_frame () { return (write_symbols == DWARF2_DEBUG + || write_symbols == VMS_AND_DWARF2_DEBUG #ifdef DWARF2_FRAME_INFO || DWARF2_FRAME_INFO #endif @@ -2115,7 +2116,7 @@ void dwarf2out_frame_finish () { /* Output call frame information. */ - if (write_symbols == DWARF2_DEBUG) + if (write_symbols == DWARF2_DEBUG || write_symbols == VMS_AND_DWARF2_DEBUG) output_call_frame_info (0); if (! USING_SJLJ_EXCEPTIONS && (flag_unwind_tables || flag_exceptions)) output_call_frame_info (1); @@ -4099,6 +4100,9 @@ dwarf_attr_name (attr) return "DW_AT_body_begin"; case DW_AT_body_end: return "DW_AT_body_end"; + case DW_AT_VMS_rtnbeg_pd_address: + return "DW_AT_VMS_rtnbeg_pd_address"; + default: return "DW_AT_"; } @@ -9311,6 +9315,15 @@ add_name_and_src_coords_attributes (die, decl) add_AT_string (die, DW_AT_MIPS_linkage_name, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl))); } + +#ifdef VMS_DEBUGGING_INFO + + /* Get the function's name, as described by its RTL. This may be different + from the DECL_NAME name used in the source file. */ + if (TREE_CODE (decl) == FUNCTION_DECL && TREE_ASM_WRITTEN (decl)) + add_AT_string (die, DW_AT_VMS_rtnbeg_pd_address, + xstrdup (XSTR (XEXP (DECL_RTL (decl), 0), 0))); +#endif } /* Push a new declaration scope. */ -- cgit v1.1