aboutsummaryrefslogtreecommitdiff
path: root/gcc/dbxout.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2001-07-15 08:34:46 +0000
committerNeil Booth <neil@gcc.gnu.org>2001-07-15 08:34:46 +0000
commite2a12aca42db7657d00b43ef76606e208159273d (patch)
tree3f39c7aa98569361a789583a5906c27e2596de19 /gcc/dbxout.c
parentbe7b80f42726389bd25888ede4f13d276bb12ef0 (diff)
downloadgcc-e2a12aca42db7657d00b43ef76606e208159273d.zip
gcc-e2a12aca42db7657d00b43ef76606e208159273d.tar.gz
gcc-e2a12aca42db7657d00b43ef76606e208159273d.tar.bz2
dbxout.c (dbxout_source_line): Make static, update prototype.
* dbxout.c (dbxout_source_line): Make static, update prototype. (dbx_debug_hooks, xcoff_debug_hooks): Add new hooks. (dbxout_init, dbxout_finish, dbxout_source_line, dbxout_begin_block, dbxout_end_block): Update for new prototypes. * dbxout.h (dbxout_source_line): Delete. * debug.c (debug_nothing_file, debug_nothing_file_int, debug_nothing_file_charstar_rtx): New. (do_nothing_debug_hooks): Update. (debug_nothing_void, debug_nothing_charstar_rtx, dwarf2out_end_epilogue): New. (debug_nothing_file_charstar, debug_nothing_file_int_int): Rename. * debug.h (struct rtx_def): Declare. (gcc_debug_hooks): New hooks source_line, end_epilogue and end_function. (debug_nothing_void, debug_nothing_charstar_rtx, dwarf2out_end_epilogue): New. (debug_nothing_file_charstar, debug_nothing_file_int_int): Rename. * dwarf2out.c (dwarf2out_source_line): Make static, update prototype. (dwarf2_debug_hooks): Update. (dwarf2out_init, dwarf2out_finish, dwarf2out_source_line, dwarf2out_begin_block, dwarf2out_end_block): Update for new prototypes. * dwarf2out.h (dwarf2out_source_line): Remove. * dwarfout.c (dwarfout_end_epilogue, dwarfout_end_function): Make static, update prototype. (dwarfout_init, dwarfout_finish, dwarfout_source_line, dwarfout_begin_block, dwarfout_end_block): Update for new prototypes. (dwarf_debug_hooks): Update. * dwarfout.h (dwarfout_end_epilogue, dwarfout_source_line, dwarfout_end_function): Remove. * final.c (profile_function): Use debug hooks for ending functions and epilogues. (output_source_line, final_end_function): Update prototype, use debug hooks. (final_start_function, final_scan_insn): Update. * output.h (sdb_begin_function_line): Remove. (final_end_function): Update prototype. * sdbout.c (sdb_begin_function_line): Make static. (PUT_SDB_EPILOGUE_END): Move to sdbout_end_epilogue. (sdbout_source_line): New. (sdbout_end_epilogue, sdbout_end_function): Make static, update prototypes. (sdb_debug_hooks): Update. (sdbout_init, sdbout_source_line, sdbout_begin_block, sdbout_end_block): Update for new prototypes. * sdbout.h (sdbout_end_epilogue, sdbout_end_function): Remove. * toplev.c (compile_file, rest_of_compilation): Update. * tree.h (dwarf2out_end_epilogue): Move to debug.h. * xcoffout.c (xcoffout_source_line, xcoffout_begin_block, xcoffout_end_block, xcoffout_end_epilogue, xcoffout_end_function): Update for prototype changes. * xcoffout.h (xcoffout_source_line, xcoffout_begin_block, xcoffout_end_block, xcoffout_end_epilogue): Update prototypes. From-SVN: r44017
Diffstat (limited to 'gcc/dbxout.c')
-rw-r--r--gcc/dbxout.c54
1 files changed, 29 insertions, 25 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index d88b8eb..3dd3f80 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -284,10 +284,11 @@ static int current_sym_nchars;
#define CONTIN do { } while (0)
#endif
-static void dbxout_init PARAMS ((FILE *, const char *));
-static void dbxout_finish PARAMS ((FILE *, const char *));
+static void dbxout_init PARAMS ((const char *));
+static void dbxout_finish PARAMS ((const char *));
static void dbxout_start_source_file PARAMS ((unsigned, const char *));
static void dbxout_end_source_file PARAMS ((unsigned));
+static void dbxout_source_line PARAMS ((const char *, rtx));
#if defined(ASM_OUTPUT_SECTION_NAME)
static void dbxout_function_end PARAMS ((void));
#endif
@@ -314,8 +315,8 @@ 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));
+static void dbxout_begin_block PARAMS ((unsigned, unsigned));
+static void dbxout_end_block PARAMS ((unsigned, unsigned));
struct gcc_debug_hooks dbx_debug_hooks =
{
@@ -326,7 +327,10 @@ struct gcc_debug_hooks dbx_debug_hooks =
dbxout_start_source_file,
dbxout_end_source_file,
dbxout_begin_block,
- dbxout_end_block
+ dbxout_end_block,
+ dbxout_source_line,
+ debug_nothing_void, /* end_epilogue */
+ debug_nothing_int /* end function */
};
#endif /* DBX_DEBUGGING_INFO */
@@ -340,7 +344,10 @@ struct gcc_debug_hooks xcoff_debug_hooks =
dbxout_start_source_file,
dbxout_end_source_file,
xcoffout_begin_block,
- xcoffout_end_block
+ xcoffout_end_block,
+ xcoffout_source_line,
+ xcoffout_end_epilogue,
+ xcoffout_end_function
};
#endif /* XCOFF_DEBUGGING_INFO */
@@ -371,14 +378,13 @@ dbxout_function_end ()
Initialize `typevec' and output the standard data types of C. */
static void
-dbxout_init (asm_file, input_file_name)
- FILE *asm_file;
+dbxout_init (input_file_name)
const char *input_file_name;
{
char ltext_label_name[100];
tree syms = getdecls ();
- asmfile = asm_file;
+ asmfile = asm_out_file;
typevec_len = 100;
typevec = (struct typeinfo *) xcalloc (typevec_len, sizeof typevec[0]);
@@ -556,18 +562,19 @@ dbxout_source_file (file, filename)
/* Output a line number symbol entry into output stream FILE,
for source file FILENAME and line number LINENO. */
-void
-dbxout_source_line (file, filename, lineno)
- FILE *file;
+static void
+dbxout_source_line (filename, note)
const char *filename;
- int lineno;
+ rtx note;
{
- dbxout_source_file (file, filename);
+ unsigned int lineno = NOTE_LINE_NUMBER (note);
+
+ dbxout_source_file (asmfile, filename);
#ifdef ASM_OUTPUT_SOURCE_LINE
- ASM_OUTPUT_SOURCE_LINE (file, lineno);
+ ASM_OUTPUT_SOURCE_LINE (asmfile, lineno);
#else
- fprintf (file, "%s%d,0,%d\n", ASM_STABD_OP, N_SLINE, lineno);
+ fprintf (asmfile, "%s%d,0,%d\n", ASM_STABD_OP, N_SLINE, lineno);
#endif
}
@@ -576,23 +583,21 @@ dbxout_source_line (file, filename, lineno)
/* Describe the beginning of an internal block within a function. */
static void
-dbxout_begin_block (file, line, n)
- FILE *file;
+dbxout_begin_block (line, n)
unsigned int line ATTRIBUTE_UNUSED;
unsigned int n;
{
- ASM_OUTPUT_INTERNAL_LABEL (file, "LBB", n);
+ ASM_OUTPUT_INTERNAL_LABEL (asmfile, "LBB", n);
}
/* Describe the end line-number of an internal block within a function. */
static void
-dbxout_end_block (file, line, n)
- FILE *file;
+dbxout_end_block (line, n)
unsigned int line ATTRIBUTE_UNUSED;
unsigned int n;
{
- ASM_OUTPUT_INTERNAL_LABEL (file, "LBE", n);
+ ASM_OUTPUT_INTERNAL_LABEL (asmfile, "LBE", n);
}
#endif /* DBX_DEBUGGING_INFO */
@@ -602,12 +607,11 @@ dbxout_end_block (file, line, n)
to do nothing. */
static void
-dbxout_finish (file, filename)
- FILE *file ATTRIBUTE_UNUSED;
+dbxout_finish (filename)
const char *filename ATTRIBUTE_UNUSED;
{
#ifdef DBX_OUTPUT_MAIN_SOURCE_FILE_END
- DBX_OUTPUT_MAIN_SOURCE_FILE_END (file, filename);
+ DBX_OUTPUT_MAIN_SOURCE_FILE_END (asmfile, filename);
#endif /* DBX_OUTPUT_MAIN_SOURCE_FILE_END */
}