From a5a42b92933220e45ac15c4034065c0a2be5b209 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Thu, 12 Jul 2001 05:56:27 +0000 Subject: Makefile.in (final.o): Depend on debug.h. * Makefile.in (final.o): Depend on debug.h. * dbxout.c (dbxout_begin_block, dbxout_end_block): New. (dbx_debug_hooks): Add new hooks. (xcoff_debug_hooks): New. * debug.c (debug_nothing_file_int_int): New. (do_nothing_debug_hooks): Update. * debug.h (gcc_debug_hooks): New hooks begin_block and end_block. (debug_nothing_file_int_int): New. * dwarf2out.c (dwarf2out_begin_block, dwarf2out_end_block): Make static, update prototype. (dwarf2_debug_hooks): Update. * dwarf2out.h (dwarf2out_begin_block, dwarf2out_end_block): Remove. * dwarfout.c (dwarfout_begin_block, dwarfout_end_block): Make static, update prototype. (dwarf_debug_hooks): Update. * dwarfout.h (dwarfout_begin_block, dwarfout_end_block): Remove. * final.c: Include debug.h. (final_scan_insn): Use debug hooks when beginning and ending blocks. * sdbout.c (sdbout_begin_block, sdbout_end_block): Make static, update prototype. (sdb_debug_hooks): Update. * sdbout.h (sdbout_begin_block, sdbout_end_block): Remove. * toplev.c: Distinguish between xcoff and dbx. * f/lex.c (ffelex_file_pop_, ffelex_file_push_, ffelex_hash_): Call all debug hooks, not just dwarf ones. From-SVN: r43959 --- gcc/dbxout.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) (limited to 'gcc/dbxout.c') diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 2a16e4d..d88b8eb 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -312,6 +312,11 @@ static void dbxout_block PARAMS ((tree, int, tree)); static void dbxout_really_begin_function PARAMS ((tree)); /* The debug hooks structure. */ +#if defined (DBX_DEBUGGING_INFO) + +static void dbxout_begin_block PARAMS ((FILE *, unsigned, unsigned)); +static void dbxout_end_block PARAMS ((FILE *, unsigned, unsigned)); + struct gcc_debug_hooks dbx_debug_hooks = { dbxout_init, @@ -319,8 +324,25 @@ struct gcc_debug_hooks dbx_debug_hooks = debug_nothing_int_charstar, debug_nothing_int_charstar, dbxout_start_source_file, - dbxout_end_source_file + dbxout_end_source_file, + dbxout_begin_block, + dbxout_end_block }; +#endif /* DBX_DEBUGGING_INFO */ + +#if defined (XCOFF_DEBUGGING_INFO) +struct gcc_debug_hooks xcoff_debug_hooks = +{ + dbxout_init, + dbxout_finish, + debug_nothing_int_charstar, + debug_nothing_int_charstar, + dbxout_start_source_file, + dbxout_end_source_file, + xcoffout_begin_block, + xcoffout_end_block +}; +#endif /* XCOFF_DEBUGGING_INFO */ #if defined(ASM_OUTPUT_SECTION_NAME) static void @@ -549,6 +571,32 @@ dbxout_source_line (file, filename, lineno) #endif } +#if defined (DBX_DEBUGGING_INFO) + +/* Describe the beginning of an internal block within a function. */ + +static void +dbxout_begin_block (file, line, n) + FILE *file; + unsigned int line ATTRIBUTE_UNUSED; + unsigned int n; +{ + ASM_OUTPUT_INTERNAL_LABEL (file, "LBB", n); +} + +/* Describe the end line-number of an internal block within a function. */ + +static void +dbxout_end_block (file, line, n) + FILE *file; + unsigned int line ATTRIBUTE_UNUSED; + unsigned int n; +{ + ASM_OUTPUT_INTERNAL_LABEL (file, "LBE", n); +} + +#endif /* DBX_DEBUGGING_INFO */ + /* At the end of compilation, finish writing the symbol table. Unless you define DBX_OUTPUT_MAIN_SOURCE_FILE_END, the default is to do nothing. */ -- cgit v1.1