Commit e2a12aca by Neil Booth Committed by Neil Booth

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
parent be7b80f4
2001-07-15 Neil Booth <neil@daikokuya.demon.co.uk>
* 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.
2001-07-15 Richard Henderson <rth@redhat.com> 2001-07-15 Richard Henderson <rth@redhat.com>
* config/alpha/alpha.h (TARGET_ABI_OSF): New. * config/alpha/alpha.h (TARGET_ABI_OSF): New.
......
...@@ -284,10 +284,11 @@ static int current_sym_nchars; ...@@ -284,10 +284,11 @@ static int current_sym_nchars;
#define CONTIN do { } while (0) #define CONTIN do { } while (0)
#endif #endif
static void dbxout_init PARAMS ((FILE *, const char *)); static void dbxout_init PARAMS ((const char *));
static void dbxout_finish PARAMS ((FILE *, const char *)); static void dbxout_finish PARAMS ((const char *));
static void dbxout_start_source_file PARAMS ((unsigned, const char *)); static void dbxout_start_source_file PARAMS ((unsigned, const char *));
static void dbxout_end_source_file PARAMS ((unsigned)); static void dbxout_end_source_file PARAMS ((unsigned));
static void dbxout_source_line PARAMS ((const char *, rtx));
#if defined(ASM_OUTPUT_SECTION_NAME) #if defined(ASM_OUTPUT_SECTION_NAME)
static void dbxout_function_end PARAMS ((void)); static void dbxout_function_end PARAMS ((void));
#endif #endif
...@@ -314,8 +315,8 @@ static void dbxout_really_begin_function PARAMS ((tree)); ...@@ -314,8 +315,8 @@ static void dbxout_really_begin_function PARAMS ((tree));
/* The debug hooks structure. */ /* The debug hooks structure. */
#if defined (DBX_DEBUGGING_INFO) #if defined (DBX_DEBUGGING_INFO)
static void dbxout_begin_block PARAMS ((FILE *, unsigned, unsigned)); static void dbxout_begin_block PARAMS ((unsigned, unsigned));
static void dbxout_end_block PARAMS ((FILE *, unsigned, unsigned)); static void dbxout_end_block PARAMS ((unsigned, unsigned));
struct gcc_debug_hooks dbx_debug_hooks = struct gcc_debug_hooks dbx_debug_hooks =
{ {
...@@ -326,7 +327,10 @@ struct gcc_debug_hooks dbx_debug_hooks = ...@@ -326,7 +327,10 @@ struct gcc_debug_hooks dbx_debug_hooks =
dbxout_start_source_file, dbxout_start_source_file,
dbxout_end_source_file, dbxout_end_source_file,
dbxout_begin_block, 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 */ #endif /* DBX_DEBUGGING_INFO */
...@@ -340,7 +344,10 @@ struct gcc_debug_hooks xcoff_debug_hooks = ...@@ -340,7 +344,10 @@ struct gcc_debug_hooks xcoff_debug_hooks =
dbxout_start_source_file, dbxout_start_source_file,
dbxout_end_source_file, dbxout_end_source_file,
xcoffout_begin_block, xcoffout_begin_block,
xcoffout_end_block xcoffout_end_block,
xcoffout_source_line,
xcoffout_end_epilogue,
xcoffout_end_function
}; };
#endif /* XCOFF_DEBUGGING_INFO */ #endif /* XCOFF_DEBUGGING_INFO */
...@@ -371,14 +378,13 @@ dbxout_function_end () ...@@ -371,14 +378,13 @@ dbxout_function_end ()
Initialize `typevec' and output the standard data types of C. */ Initialize `typevec' and output the standard data types of C. */
static void static void
dbxout_init (asm_file, input_file_name) dbxout_init (input_file_name)
FILE *asm_file;
const char *input_file_name; const char *input_file_name;
{ {
char ltext_label_name[100]; char ltext_label_name[100];
tree syms = getdecls (); tree syms = getdecls ();
asmfile = asm_file; asmfile = asm_out_file;
typevec_len = 100; typevec_len = 100;
typevec = (struct typeinfo *) xcalloc (typevec_len, sizeof typevec[0]); typevec = (struct typeinfo *) xcalloc (typevec_len, sizeof typevec[0]);
...@@ -556,18 +562,19 @@ dbxout_source_file (file, filename) ...@@ -556,18 +562,19 @@ dbxout_source_file (file, filename)
/* Output a line number symbol entry into output stream FILE, /* Output a line number symbol entry into output stream FILE,
for source file FILENAME and line number LINENO. */ for source file FILENAME and line number LINENO. */
void static void
dbxout_source_line (file, filename, lineno) dbxout_source_line (filename, note)
FILE *file;
const char *filename; 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 #ifdef ASM_OUTPUT_SOURCE_LINE
ASM_OUTPUT_SOURCE_LINE (file, lineno); ASM_OUTPUT_SOURCE_LINE (asmfile, lineno);
#else #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 #endif
} }
...@@ -576,23 +583,21 @@ dbxout_source_line (file, filename, lineno) ...@@ -576,23 +583,21 @@ dbxout_source_line (file, filename, lineno)
/* Describe the beginning of an internal block within a function. */ /* Describe the beginning of an internal block within a function. */
static void static void
dbxout_begin_block (file, line, n) dbxout_begin_block (line, n)
FILE *file;
unsigned int line ATTRIBUTE_UNUSED; unsigned int line ATTRIBUTE_UNUSED;
unsigned int n; 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. */ /* Describe the end line-number of an internal block within a function. */
static void static void
dbxout_end_block (file, line, n) dbxout_end_block (line, n)
FILE *file;
unsigned int line ATTRIBUTE_UNUSED; unsigned int line ATTRIBUTE_UNUSED;
unsigned int n; unsigned int n;
{ {
ASM_OUTPUT_INTERNAL_LABEL (file, "LBE", n); ASM_OUTPUT_INTERNAL_LABEL (asmfile, "LBE", n);
} }
#endif /* DBX_DEBUGGING_INFO */ #endif /* DBX_DEBUGGING_INFO */
...@@ -602,12 +607,11 @@ dbxout_end_block (file, line, n) ...@@ -602,12 +607,11 @@ dbxout_end_block (file, line, n)
to do nothing. */ to do nothing. */
static void static void
dbxout_finish (file, filename) dbxout_finish (filename)
FILE *file ATTRIBUTE_UNUSED;
const char *filename ATTRIBUTE_UNUSED; const char *filename ATTRIBUTE_UNUSED;
{ {
#ifdef DBX_OUTPUT_MAIN_SOURCE_FILE_END #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 */ #endif /* DBX_OUTPUT_MAIN_SOURCE_FILE_END */
} }
......
...@@ -26,5 +26,4 @@ extern void dbxout_parms PARAMS ((tree)); ...@@ -26,5 +26,4 @@ extern void dbxout_parms PARAMS ((tree));
extern void dbxout_reg_parms PARAMS ((tree)); extern void dbxout_reg_parms PARAMS ((tree));
extern int dbxout_syms PARAMS ((tree)); extern int dbxout_syms PARAMS ((tree));
extern void dbxout_function PARAMS ((tree)); extern void dbxout_function PARAMS ((tree));
extern void dbxout_source_line PARAMS ((FILE *, const char *, int));
extern void dbxout_begin_function PARAMS ((tree)); extern void dbxout_begin_function PARAMS ((tree));
...@@ -22,22 +22,29 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ...@@ -22,22 +22,29 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* The do-nothing debug hooks. */ /* The do-nothing debug hooks. */
struct gcc_debug_hooks do_nothing_debug_hooks = struct gcc_debug_hooks do_nothing_debug_hooks =
{ {
debug_nothing_file_charstar, debug_nothing_charstar,
debug_nothing_file_charstar, debug_nothing_charstar,
debug_nothing_int_charstar, debug_nothing_int_charstar,
debug_nothing_int_charstar, debug_nothing_int_charstar,
debug_nothing_int_charstar, debug_nothing_int_charstar,
debug_nothing_int, debug_nothing_int,
debug_nothing_file_int_int, debug_nothing_int_int,
debug_nothing_file_int_int debug_nothing_int_int,
debug_nothing_charstar_rtx,
debug_nothing_void,
debug_nothing_int
}; };
/* This file contains implementations of each debug hook that do /* This file contains implementations of each debug hook that do
nothing. */ nothing. */
void void
debug_nothing_file_charstar (file, main_filename) debug_nothing_void ()
FILE *file ATTRIBUTE_UNUSED; {
}
void
debug_nothing_charstar (main_filename)
const char *main_filename ATTRIBUTE_UNUSED; const char *main_filename ATTRIBUTE_UNUSED;
{ {
} }
...@@ -56,9 +63,15 @@ debug_nothing_int (line) ...@@ -56,9 +63,15 @@ debug_nothing_int (line)
} }
void void
debug_nothing_file_int_int (file, line, n) debug_nothing_int_int (line, n)
FILE *file ATTRIBUTE_UNUSED;
unsigned int line ATTRIBUTE_UNUSED; unsigned int line ATTRIBUTE_UNUSED;
unsigned int n ATTRIBUTE_UNUSED; unsigned int n ATTRIBUTE_UNUSED;
{ {
} }
void
debug_nothing_charstar_rtx (filename, note)
const char *filename ATTRIBUTE_UNUSED;
struct rtx_def *note ATTRIBUTE_UNUSED;
{
}
...@@ -18,17 +18,19 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ...@@ -18,17 +18,19 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef GCC_DEBUG_H #ifndef GCC_DEBUG_H
#define GCC_DEBUG_H #define GCC_DEBUG_H
struct rtx_def;
/* This structure contains hooks for the debug information output /* This structure contains hooks for the debug information output
functions, accessed through the global instance debug_hooks set in functions, accessed through the global instance debug_hooks set in
toplev.c according to command line options. */ toplev.c according to command line options. */
struct gcc_debug_hooks struct gcc_debug_hooks
{ {
/* Initialise debug output to FILE. MAIN_FILENAME is the name of /* Initialise debug output. MAIN_FILENAME is the name of the main
the main input file. */ input file. */
void (* init) PARAMS ((FILE * file, const char *main_filename)); void (* init) PARAMS ((const char *main_filename));
/* Output debug symbols to FILE. */ /* Output debug symbols. */
void (* finish) PARAMS ((FILE * file, const char *main_filename)); void (* finish) PARAMS ((const char *main_filename));
/* Macro defined on line LINE with name and expansion TEXT. */ /* Macro defined on line LINE with name and expansion TEXT. */
void (* define) PARAMS ((unsigned int line, const char *text)); void (* define) PARAMS ((unsigned int line, const char *text));
...@@ -45,24 +47,38 @@ struct gcc_debug_hooks ...@@ -45,24 +47,38 @@ struct gcc_debug_hooks
void (* end_source_file) PARAMS ((unsigned int line)); void (* end_source_file) PARAMS ((unsigned int line));
/* Record the beginning of block N, counting from 1 and not /* Record the beginning of block N, counting from 1 and not
including the function-scope block, at LINE. Output to FILE. */ including the function-scope block, at LINE. */
void (* begin_block) PARAMS ((FILE *, unsigned int line, unsigned int n)); void (* begin_block) PARAMS ((unsigned int line, unsigned int n));
/* Record the end of a block. Arguments as for begin_block. */ /* Record the end of a block. Arguments as for begin_block. */
void (* end_block) PARAMS ((FILE *, unsigned int line, unsigned int n)); void (* end_block) PARAMS ((unsigned int line, unsigned int n));
/* Record a line based on NOTE. Obtain the line number with
NOTE_LINE_NUMBER (note). */
void (* source_line) PARAMS ((const char *filename, struct rtx_def *note));
/* Record end of epilogue code. */
void (* end_epilogue) PARAMS ((void));
/* Record end of function. LINE is highest line number in function. */
void (* end_function) PARAMS ((unsigned int line));
}; };
extern struct gcc_debug_hooks *debug_hooks; extern struct gcc_debug_hooks *debug_hooks;
/* The do-nothing hooks. */ /* The do-nothing hooks. */
extern void debug_nothing_file_charstar extern void debug_nothing_void
PARAMS ((FILE *, const char *)); PARAMS ((void));
extern void debug_nothing_charstar
PARAMS ((const char *));
extern void debug_nothing_int_charstar extern void debug_nothing_int_charstar
PARAMS ((unsigned int, const char *)); PARAMS ((unsigned int, const char *));
extern void debug_nothing_int extern void debug_nothing_int
PARAMS ((unsigned int)); PARAMS ((unsigned int));
extern void debug_nothing_file_int_int extern void debug_nothing_int_int
PARAMS ((FILE *, unsigned int, unsigned int)); PARAMS ((unsigned int, unsigned int));
extern void debug_nothing_charstar_rtx
PARAMS ((const char *, struct rtx_def *));
/* Hooks for various debug formats. */ /* Hooks for various debug formats. */
extern struct gcc_debug_hooks do_nothing_debug_hooks; extern struct gcc_debug_hooks do_nothing_debug_hooks;
...@@ -72,4 +88,9 @@ extern struct gcc_debug_hooks xcoff_debug_hooks; ...@@ -72,4 +88,9 @@ extern struct gcc_debug_hooks xcoff_debug_hooks;
extern struct gcc_debug_hooks dwarf_debug_hooks; extern struct gcc_debug_hooks dwarf_debug_hooks;
extern struct gcc_debug_hooks dwarf2_debug_hooks; extern struct gcc_debug_hooks dwarf2_debug_hooks;
/* Dwarf2 frame information. */
extern void dwarf2out_end_epilogue
PARAMS ((void));
#endif /* !GCC_DEBUG_H */ #endif /* !GCC_DEBUG_H */
...@@ -3001,14 +3001,15 @@ get_cfa_from_loc_descr (cfa, loc) ...@@ -3001,14 +3001,15 @@ get_cfa_from_loc_descr (cfa, loc)
/* And now, the support for symbolic debugging information. */ /* And now, the support for symbolic debugging information. */
#ifdef DWARF2_DEBUGGING_INFO #ifdef DWARF2_DEBUGGING_INFO
static void dwarf2out_init PARAMS ((FILE *, const char *)); static void dwarf2out_init PARAMS ((const char *));
static void dwarf2out_finish PARAMS ((FILE *, const char *)); static void dwarf2out_finish PARAMS ((const char *));
static void dwarf2out_define PARAMS ((unsigned int, const char *)); static void dwarf2out_define PARAMS ((unsigned int, const char *));
static void dwarf2out_undef PARAMS ((unsigned int, const char *)); static void dwarf2out_undef PARAMS ((unsigned int, const char *));
static void dwarf2out_start_source_file PARAMS ((unsigned, const char *)); static void dwarf2out_start_source_file PARAMS ((unsigned, const char *));
static void dwarf2out_end_source_file PARAMS ((unsigned)); static void dwarf2out_end_source_file PARAMS ((unsigned));
static void dwarf2out_begin_block PARAMS ((FILE *, unsigned, unsigned)); static void dwarf2out_begin_block PARAMS ((unsigned, unsigned));
static void dwarf2out_end_block PARAMS ((FILE *, unsigned, unsigned)); static void dwarf2out_end_block PARAMS ((unsigned, unsigned));
static void dwarf2out_source_line PARAMS ((const char *, rtx));
/* The debug hooks structure. */ /* The debug hooks structure. */
...@@ -3021,7 +3022,10 @@ struct gcc_debug_hooks dwarf2_debug_hooks = ...@@ -3021,7 +3022,10 @@ struct gcc_debug_hooks dwarf2_debug_hooks =
dwarf2out_start_source_file, dwarf2out_start_source_file,
dwarf2out_end_source_file, dwarf2out_end_source_file,
dwarf2out_begin_block, dwarf2out_begin_block,
dwarf2out_end_block dwarf2out_end_block,
dwarf2out_source_line,
dwarf2out_end_epilogue,
debug_nothing_int /* end_function */
}; };
/* NOTE: In the comments in this file, many references are made to /* NOTE: In the comments in this file, many references are made to
...@@ -11108,8 +11112,7 @@ dwarf2out_decl (decl) ...@@ -11108,8 +11112,7 @@ dwarf2out_decl (decl)
a lexical block. */ a lexical block. */
static void static void
dwarf2out_begin_block (file, line, blocknum) dwarf2out_begin_block (line, blocknum)
FILE *file ATTRIBUTE_UNUSED;
unsigned int line ATTRIBUTE_UNUSED; unsigned int line ATTRIBUTE_UNUSED;
unsigned int blocknum; unsigned int blocknum;
{ {
...@@ -11121,8 +11124,7 @@ dwarf2out_begin_block (file, line, blocknum) ...@@ -11121,8 +11124,7 @@ dwarf2out_begin_block (file, line, blocknum)
lexical block. */ lexical block. */
static void static void
dwarf2out_end_block (file, line, blocknum) dwarf2out_end_block (line, blocknum)
FILE *file ATTRIBUTE_UNUSED;
unsigned int line ATTRIBUTE_UNUSED; unsigned int line ATTRIBUTE_UNUSED;
unsigned int blocknum; unsigned int blocknum;
{ {
...@@ -11221,11 +11223,13 @@ init_file_table () ...@@ -11221,11 +11223,13 @@ init_file_table ()
and record information relating to this source line, in and record information relating to this source line, in
'line_info_table' for later output of the .debug_line section. */ 'line_info_table' for later output of the .debug_line section. */
void static void
dwarf2out_line (filename, line) dwarf2out_source_line (filename, note)
register const char *filename; register const char *filename;
register unsigned line; rtx note;
{ {
unsigned int line = NOTE_LINE_NUMBER (note);
if (debug_info_level >= DINFO_LEVEL_NORMAL) if (debug_info_level >= DINFO_LEVEL_NORMAL)
{ {
function_section (current_function_decl); function_section (current_function_decl);
...@@ -11385,8 +11389,7 @@ dwarf2out_undef (lineno, buffer) ...@@ -11385,8 +11389,7 @@ dwarf2out_undef (lineno, buffer)
/* Set up for Dwarf output at the start of compilation. */ /* Set up for Dwarf output at the start of compilation. */
static void static void
dwarf2out_init (asm_out_file, main_input_filename) dwarf2out_init (main_input_filename)
register FILE *asm_out_file;
register const char *main_input_filename; register const char *main_input_filename;
{ {
init_file_table (); init_file_table ();
...@@ -11475,8 +11478,7 @@ dwarf2out_init (asm_out_file, main_input_filename) ...@@ -11475,8 +11478,7 @@ dwarf2out_init (asm_out_file, main_input_filename)
and generate the DWARF-2 debugging info. */ and generate the DWARF-2 debugging info. */
static void static void
dwarf2out_finish (asm_out_file, input_filename) dwarf2out_finish (input_filename)
register FILE *asm_out_file;
register const char *input_filename ATTRIBUTE_UNUSED; register const char *input_filename ATTRIBUTE_UNUSED;
{ {
limbo_die_node *node, *next_node; limbo_die_node *node, *next_node;
......
...@@ -20,7 +20,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -20,7 +20,6 @@ Boston, MA 02111-1307, USA. */
extern int dwarf2out_ignore_block PARAMS ((tree)); extern int dwarf2out_ignore_block PARAMS ((tree));
extern void dwarf2out_decl PARAMS ((tree)); extern void dwarf2out_decl PARAMS ((tree));
extern void dwarf2out_line PARAMS ((const char *, unsigned));
extern void dwarf2out_frame_init PARAMS ((void)); extern void dwarf2out_frame_init PARAMS ((void));
extern void dwarf2out_frame_debug PARAMS ((rtx)); extern void dwarf2out_frame_debug PARAMS ((rtx));
extern void dwarf2out_frame_finish PARAMS ((void)); extern void dwarf2out_frame_finish PARAMS ((void));
......
...@@ -787,16 +787,19 @@ static int in_class; ...@@ -787,16 +787,19 @@ static int in_class;
/* Forward declarations for functions defined in this file. */ /* Forward declarations for functions defined in this file. */
static void dwarfout_init PARAMS ((FILE *, const char *)); static void dwarfout_init PARAMS ((const char *));
static void dwarfout_finish PARAMS ((FILE *, const char *)); static void dwarfout_finish PARAMS ((const char *));
static void dwarfout_define PARAMS ((unsigned int, const char *)); static void dwarfout_define PARAMS ((unsigned int, const char *));
static void dwarfout_undef PARAMS ((unsigned int, const char *)); static void dwarfout_undef PARAMS ((unsigned int, const char *));
static void dwarfout_start_source_file PARAMS ((unsigned, const char *)); static void dwarfout_start_source_file PARAMS ((unsigned, const char *));
static void dwarfout_start_source_file_check PARAMS ((unsigned, const char *)); static void dwarfout_start_source_file_check PARAMS ((unsigned, const char *));
static void dwarfout_end_source_file PARAMS ((unsigned)); static void dwarfout_end_source_file PARAMS ((unsigned));
static void dwarfout_end_source_file_check PARAMS ((unsigned)); static void dwarfout_end_source_file_check PARAMS ((unsigned));
static void dwarfout_begin_block PARAMS ((FILE *, unsigned, unsigned)); static void dwarfout_begin_block PARAMS ((unsigned, unsigned));
static void dwarfout_end_block PARAMS ((FILE *, unsigned, unsigned)); static void dwarfout_end_block PARAMS ((unsigned, unsigned));
static void dwarfout_end_epilogue PARAMS ((void));
static void dwarfout_source_line PARAMS (( const char *, rtx));
static void dwarfout_end_function PARAMS ((unsigned int));
static const char *dwarf_tag_name PARAMS ((unsigned)); static const char *dwarf_tag_name PARAMS ((unsigned));
static const char *dwarf_attr_name PARAMS ((unsigned)); static const char *dwarf_attr_name PARAMS ((unsigned));
static const char *dwarf_stack_op_name PARAMS ((unsigned)); static const char *dwarf_stack_op_name PARAMS ((unsigned));
...@@ -1379,7 +1382,10 @@ struct gcc_debug_hooks dwarf_debug_hooks = ...@@ -1379,7 +1382,10 @@ struct gcc_debug_hooks dwarf_debug_hooks =
dwarfout_start_source_file_check, dwarfout_start_source_file_check,
dwarfout_end_source_file_check, dwarfout_end_source_file_check,
dwarfout_begin_block, dwarfout_begin_block,
dwarfout_end_block dwarfout_end_block,
dwarfout_source_line,
dwarfout_end_epilogue,
dwarfout_end_function
}; };
/************************ general utility functions **************************/ /************************ general utility functions **************************/
...@@ -5838,8 +5844,7 @@ dwarfout_file_scope_decl (decl, set_finalizing) ...@@ -5838,8 +5844,7 @@ dwarfout_file_scope_decl (decl, set_finalizing)
for a lexical block. */ for a lexical block. */
static void static void
dwarfout_begin_block (file, line, blocknum) dwarfout_begin_block (line, blocknum)
FILE *file ATTRIBUTE_UNUSED;
unsigned int line ATTRIBUTE_UNUSED; unsigned int line ATTRIBUTE_UNUSED;
unsigned int blocknum; unsigned int blocknum;
{ {
...@@ -5854,8 +5859,7 @@ dwarfout_begin_block (file, line, blocknum) ...@@ -5854,8 +5859,7 @@ dwarfout_begin_block (file, line, blocknum)
for a lexical block. */ for a lexical block. */
static void static void
dwarfout_end_block (file, line, blocknum) dwarfout_end_block (line, blocknum)
FILE *file ATTRIBUTE_UNUSED;
unsigned int line ATTRIBUTE_UNUSED; unsigned int line ATTRIBUTE_UNUSED;
unsigned int blocknum; unsigned int blocknum;
{ {
...@@ -5885,8 +5889,9 @@ dwarfout_begin_function () ...@@ -5885,8 +5889,9 @@ dwarfout_begin_function ()
/* Output a marker (i.e. a label) for the point in the generated code where /* Output a marker (i.e. a label) for the point in the generated code where
the real body of the function ends (just before the epilogue code). */ the real body of the function ends (just before the epilogue code). */
void static void
dwarfout_end_function () dwarfout_end_function (line)
unsigned int line ATTRIBUTE_UNUSED;
{ {
char label[MAX_ARTIFICIAL_LABEL_BYTES]; char label[MAX_ARTIFICIAL_LABEL_BYTES];
...@@ -5901,7 +5906,7 @@ dwarfout_end_function () ...@@ -5901,7 +5906,7 @@ dwarfout_end_function ()
for a function definition. This gets called *after* the epilogue code for a function definition. This gets called *after* the epilogue code
has been generated. */ has been generated. */
void static void
dwarfout_end_epilogue () dwarfout_end_epilogue ()
{ {
char label[MAX_ARTIFICIAL_LABEL_BYTES]; char label[MAX_ARTIFICIAL_LABEL_BYTES];
...@@ -6053,11 +6058,13 @@ generate_srcinfo_entry (line_entry_num, files_entry_num) ...@@ -6053,11 +6058,13 @@ generate_srcinfo_entry (line_entry_num, files_entry_num)
ASM_OUTPUT_POP_SECTION (asm_out_file); ASM_OUTPUT_POP_SECTION (asm_out_file);
} }
void static void
dwarfout_line (filename, line) dwarfout_source_line (filename, note)
register const char *filename; const char *filename;
register unsigned line; rtx note;
{ {
unsigned int line = NOTE_LINE_NUMBER (note);
if (debug_info_level >= DINFO_LEVEL_NORMAL if (debug_info_level >= DINFO_LEVEL_NORMAL
/* We can't emit line number info for functions in separate sections, /* We can't emit line number info for functions in separate sections,
because the assembler can't subtract labels in different sections. */ because the assembler can't subtract labels in different sections. */
...@@ -6215,8 +6222,7 @@ dwarfout_undef (lineno, buffer) ...@@ -6215,8 +6222,7 @@ dwarfout_undef (lineno, buffer)
/* Set up for Dwarf output at the start of compilation. */ /* Set up for Dwarf output at the start of compilation. */
static void static void
dwarfout_init (asm_out_file, main_input_filename) dwarfout_init (main_input_filename)
register FILE *asm_out_file;
register const char *main_input_filename; register const char *main_input_filename;
{ {
/* Remember the name of the primary input file. */ /* Remember the name of the primary input file. */
...@@ -6405,8 +6411,7 @@ dwarfout_init (asm_out_file, main_input_filename) ...@@ -6405,8 +6411,7 @@ dwarfout_init (asm_out_file, main_input_filename)
/* Output stuff that dwarf requires at the end of every file. */ /* Output stuff that dwarf requires at the end of every file. */
static void static void
dwarfout_finish (asm_out_file, main_input_filename) dwarfout_finish (main_input_filename)
register FILE *asm_out_file;
register const char *main_input_filename ATTRIBUTE_UNUSED; register const char *main_input_filename ATTRIBUTE_UNUSED;
{ {
char label[MAX_ARTIFICIAL_LABEL_BYTES]; char label[MAX_ARTIFICIAL_LABEL_BYTES];
......
...@@ -21,8 +21,3 @@ Boston, MA 02111-1307, USA. */ ...@@ -21,8 +21,3 @@ Boston, MA 02111-1307, USA. */
extern void dwarfout_file_scope_decl PARAMS ((tree , int)); extern void dwarfout_file_scope_decl PARAMS ((tree , int));
extern void dwarfout_begin_function PARAMS ((void)); extern void dwarfout_begin_function PARAMS ((void));
extern void dwarfout_end_function PARAMS ((void));
extern void dwarfout_begin_epilogue PARAMS ((void));
extern void dwarfout_end_epilogue PARAMS ((void));
extern void dwarfout_line PARAMS ((const char *, unsigned));
...@@ -252,7 +252,7 @@ static void profile_function PARAMS ((FILE *)); ...@@ -252,7 +252,7 @@ static void profile_function PARAMS ((FILE *));
static void profile_after_prologue PARAMS ((FILE *)); static void profile_after_prologue PARAMS ((FILE *));
static void add_bb PARAMS ((FILE *)); static void add_bb PARAMS ((FILE *));
static int add_bb_string PARAMS ((const char *, int)); static int add_bb_string PARAMS ((const char *, int));
static void output_source_line PARAMS ((FILE *, rtx)); static void output_source_line PARAMS ((rtx));
static rtx walk_alter_subreg PARAMS ((rtx)); static rtx walk_alter_subreg PARAMS ((rtx));
static void output_asm_name PARAMS ((void)); static void output_asm_name PARAMS ((void));
static void output_operand PARAMS ((rtx, int)); static void output_operand PARAMS ((rtx, int));
...@@ -1606,7 +1606,7 @@ final_start_function (first, file, optimize) ...@@ -1606,7 +1606,7 @@ final_start_function (first, file, optimize)
/* But only output line number for other debug info types if -g2 /* But only output line number for other debug info types if -g2
or better. */ or better. */
if (NOTE_LINE_NUMBER (first) != NOTE_INSN_DELETED) if (NOTE_LINE_NUMBER (first) != NOTE_INSN_DELETED)
output_source_line (file, first); output_source_line (first);
#ifdef LEAF_REG_REMAP #ifdef LEAF_REG_REMAP
if (current_function_uses_only_leaf_regs) if (current_function_uses_only_leaf_regs)
...@@ -1757,52 +1757,24 @@ profile_function (file) ...@@ -1757,52 +1757,24 @@ profile_function (file)
even though not all of them are needed. */ even though not all of them are needed. */
void void
final_end_function (first, file, optimize) final_end_function ()
rtx first ATTRIBUTE_UNUSED;
FILE *file ATTRIBUTE_UNUSED;
int optimize ATTRIBUTE_UNUSED;
{ {
app_disable (); app_disable ();
#ifdef SDB_DEBUGGING_INFO (*debug_hooks->end_function) (high_function_linenum);
if (write_symbols == SDB_DEBUG)
sdbout_end_function (high_function_linenum);
#endif
#ifdef DWARF_DEBUGGING_INFO
if (write_symbols == DWARF_DEBUG)
dwarfout_end_function ();
#endif
#ifdef XCOFF_DEBUGGING_INFO
if (write_symbols == XCOFF_DEBUG)
xcoffout_end_function (file, high_function_linenum);
#endif
/* Finally, output the function epilogue: /* Finally, output the function epilogue:
code to restore the stack frame and return to the caller. */ code to restore the stack frame and return to the caller. */
(*targetm.asm_out.function_epilogue) (file, get_frame_size ()); (*targetm.asm_out.function_epilogue) (asm_out_file, get_frame_size ());
#ifdef SDB_DEBUGGING_INFO /* And debug output. */
if (write_symbols == SDB_DEBUG) (*debug_hooks->end_epilogue) ();
sdbout_end_epilogue ();
#endif
#ifdef DWARF_DEBUGGING_INFO #if defined (DWARF2_UNWIND_INFO)
if (write_symbols == DWARF_DEBUG) if (write_symbols != DWARF2_DEBUG && dwarf2out_do_frame ())
dwarfout_end_epilogue ();
#endif
#if defined (DWARF2_UNWIND_INFO) || defined (DWARF2_DEBUGGING_INFO)
if (dwarf2out_do_frame ())
dwarf2out_end_epilogue (); dwarf2out_end_epilogue ();
#endif #endif
#ifdef XCOFF_DEBUGGING_INFO
if (write_symbols == XCOFF_DEBUG)
xcoffout_end_epilogue (file);
#endif
bb_func_label_num = -1; /* not in function, nuke label # */ bb_func_label_num = -1; /* not in function, nuke label # */
} }
...@@ -2140,7 +2112,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes) ...@@ -2140,7 +2112,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
high_block_linenum = last_linenum; high_block_linenum = last_linenum;
/* Output debugging info about the symbol-block beginning. */ /* Output debugging info about the symbol-block beginning. */
(*debug_hooks->begin_block) (file, last_linenum, n); (*debug_hooks->begin_block) (last_linenum, n);
/* Mark this block as output. */ /* Mark this block as output. */
TREE_ASM_WRITTEN (NOTE_BLOCK (insn)) = 1; TREE_ASM_WRITTEN (NOTE_BLOCK (insn)) = 1;
...@@ -2162,7 +2134,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes) ...@@ -2162,7 +2134,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
if (block_depth < 0) if (block_depth < 0)
abort (); abort ();
(*debug_hooks->end_block) (file, high_block_linenum, n); (*debug_hooks->end_block) (high_block_linenum, n);
} }
break; break;
...@@ -2219,7 +2191,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes) ...@@ -2219,7 +2191,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
/* Output this line note if it is the first or the last line /* Output this line note if it is the first or the last line
note in a row. */ note in a row. */
if (!note_after) if (!note_after)
output_source_line (file, insn); output_source_line (insn);
} }
break; break;
} }
...@@ -2934,8 +2906,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes) ...@@ -2934,8 +2906,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
based on the NOTE-insn INSN, assumed to be a line number. */ based on the NOTE-insn INSN, assumed to be a line number. */
static void static void
output_source_line (file, insn) output_source_line (insn)
FILE *file ATTRIBUTE_UNUSED;
rtx insn; rtx insn;
{ {
register const char *filename = NOTE_SOURCE_FILE (insn); register const char *filename = NOTE_SOURCE_FILE (insn);
...@@ -2953,47 +2924,7 @@ output_source_line (file, insn) ...@@ -2953,47 +2924,7 @@ output_source_line (file, insn)
high_block_linenum = MAX (last_linenum, high_block_linenum); high_block_linenum = MAX (last_linenum, high_block_linenum);
high_function_linenum = MAX (last_linenum, high_function_linenum); high_function_linenum = MAX (last_linenum, high_function_linenum);
if (write_symbols != NO_DEBUG) (*debug_hooks->source_line) (filename, insn);
{
#ifdef SDB_DEBUGGING_INFO
if (write_symbols == SDB_DEBUG
#if 0 /* People like having line numbers even in wrong file! */
/* COFF can't handle multiple source files--lose, lose. */
&& !strcmp (filename, main_input_filename)
#endif
/* COFF relative line numbers must be positive. */
&& last_linenum > sdb_begin_function_line)
{
#ifdef ASM_OUTPUT_SOURCE_LINE
ASM_OUTPUT_SOURCE_LINE (file, last_linenum);
#else
fprintf (file, "\t.ln\t%d\n",
((sdb_begin_function_line > -1)
? last_linenum - sdb_begin_function_line : 1));
#endif
}
#endif
#if defined (DBX_DEBUGGING_INFO)
if (write_symbols == DBX_DEBUG)
dbxout_source_line (file, filename, NOTE_LINE_NUMBER (insn));
#endif
#if defined (XCOFF_DEBUGGING_INFO)
if (write_symbols == XCOFF_DEBUG)
xcoffout_source_line (file, filename, insn);
#endif
#ifdef DWARF_DEBUGGING_INFO
if (write_symbols == DWARF_DEBUG)
dwarfout_line (filename, NOTE_LINE_NUMBER (insn));
#endif
#ifdef DWARF2_DEBUGGING_INFO
if (write_symbols == DWARF2_DEBUG)
dwarf2out_line (filename, NOTE_LINE_NUMBER (insn));
#endif
}
} }
/* For each operand in INSN, simplify (subreg (reg)) so that it refers /* For each operand in INSN, simplify (subreg (reg)) so that it refers
......
...@@ -62,7 +62,7 @@ extern void final_start_function PARAMS ((rtx, FILE *, int)); ...@@ -62,7 +62,7 @@ extern void final_start_function PARAMS ((rtx, FILE *, int));
/* Output assembler code for the end of a function. /* Output assembler code for the end of a function.
For clarity, args are same as those of `final_start_function' For clarity, args are same as those of `final_start_function'
even though not all of them are needed. */ even though not all of them are needed. */
extern void final_end_function PARAMS ((rtx, FILE *, int)); extern void final_end_function PARAMS ((void));
/* Output assembler code for some insns: all or part of a function. */ /* Output assembler code for some insns: all or part of a function. */
extern void final PARAMS ((rtx, FILE *, int, int)); extern void final PARAMS ((rtx, FILE *, int, int));
...@@ -374,13 +374,6 @@ extern void output_constant PARAMS ((tree, int)); ...@@ -374,13 +374,6 @@ extern void output_constant PARAMS ((tree, int));
extern rtx final_sequence; extern rtx final_sequence;
#endif #endif
/* The line number of the beginning of the current function.
sdbout.c needs this so that it can output relative linenumbers. */
#ifdef SDB_DEBUGGING_INFO /* Avoid undef sym in certain broken linkers. */
extern int sdb_begin_function_line;
#endif
/* File in which assembler code is being written. */ /* File in which assembler code is being written. */
#ifdef BUFSIZ #ifdef BUFSIZ
......
...@@ -80,7 +80,7 @@ AT&T C compiler. From the example below I would conclude the following: ...@@ -80,7 +80,7 @@ AT&T C compiler. From the example below I would conclude the following:
/* Line number of beginning of current function, minus one. /* Line number of beginning of current function, minus one.
Negative means not in a function or not using sdb. */ Negative means not in a function or not using sdb. */
int sdb_begin_function_line = -1; static int sdb_begin_function_line = -1;
/* Counter to generate unique "names" for nameless struct members. */ /* Counter to generate unique "names" for nameless struct members. */
...@@ -92,11 +92,14 @@ extern tree current_function_decl; ...@@ -92,11 +92,14 @@ extern tree current_function_decl;
#include "sdbout.h" #include "sdbout.h"
static void sdbout_init PARAMS ((FILE *, const char *)); static void sdbout_init PARAMS ((const char *));
static void sdbout_start_source_file PARAMS ((unsigned, const char *)); static void sdbout_start_source_file PARAMS ((unsigned, const char *));
static void sdbout_end_source_file PARAMS ((unsigned)); static void sdbout_end_source_file PARAMS ((unsigned));
static void sdbout_begin_block PARAMS ((FILE *, unsigned, unsigned)); static void sdbout_begin_block PARAMS ((unsigned, unsigned));
static void sdbout_end_block PARAMS ((FILE *, unsigned, unsigned)); static void sdbout_end_block PARAMS ((unsigned, unsigned));
static void sdbout_source_line PARAMS ((const char *, rtx));
static void sdbout_end_epilogue PARAMS ((void));
static void sdbout_end_function PARAMS ((unsigned int));
static char *gen_fake_label PARAMS ((void)); static char *gen_fake_label PARAMS ((void));
static int plain_type PARAMS ((tree)); static int plain_type PARAMS ((tree));
static int template_name_p PARAMS ((tree)); static int template_name_p PARAMS ((tree));
...@@ -225,15 +228,6 @@ do { fprintf (asm_out_file, "\t.tag\t"); \ ...@@ -225,15 +228,6 @@ do { fprintf (asm_out_file, "\t.tag\t"); \
SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM) SDB_DELIM, SDB_DELIM, SDB_DELIM, (LINE), SDB_DELIM)
#endif #endif
#ifndef PUT_SDB_EPILOGUE_END
#define PUT_SDB_EPILOGUE_END(NAME) \
do { fprintf (asm_out_file, "\t.def\t"); \
assemble_name (asm_out_file, NAME); \
fprintf (asm_out_file, \
"%s\t.val\t.%s\t.scl\t-1%s\t.endef\n", \
SDB_DELIM, SDB_DELIM, SDB_DELIM); } while (0)
#endif
#ifndef SDB_GENERATE_FAKE #ifndef SDB_GENERATE_FAKE
#define SDB_GENERATE_FAKE(BUFFER, NUMBER) \ #define SDB_GENERATE_FAKE(BUFFER, NUMBER) \
sprintf ((BUFFER), ".%dfake", (NUMBER)); sprintf ((BUFFER), ".%dfake", (NUMBER));
...@@ -297,13 +291,16 @@ static struct sdb_file *current_file; ...@@ -297,13 +291,16 @@ static struct sdb_file *current_file;
struct gcc_debug_hooks sdb_debug_hooks = struct gcc_debug_hooks sdb_debug_hooks =
{ {
sdbout_init, sdbout_init,
debug_nothing_file_charstar, debug_nothing_charstar,
debug_nothing_int_charstar, debug_nothing_int_charstar,
debug_nothing_int_charstar, debug_nothing_int_charstar,
sdbout_start_source_file, sdbout_start_source_file,
sdbout_end_source_file, sdbout_end_source_file,
sdbout_begin_block, sdbout_begin_block,
sdbout_end_block sdbout_end_block,
sdbout_source_line,
sdbout_end_epilogue,
sdbout_end_function
}; };
#if 0 #if 0
...@@ -1471,8 +1468,7 @@ sdbout_reg_parms (parms) ...@@ -1471,8 +1468,7 @@ sdbout_reg_parms (parms)
if the count starts at 0 for the outermost one. */ if the count starts at 0 for the outermost one. */
static void static void
sdbout_begin_block (file, line, n) sdbout_begin_block (line, n)
FILE *file ATTRIBUTE_UNUSED;
unsigned int line; unsigned int line;
unsigned int n; unsigned int n;
{ {
...@@ -1508,9 +1504,8 @@ sdbout_begin_block (file, line, n) ...@@ -1508,9 +1504,8 @@ sdbout_begin_block (file, line, n)
/* Describe the end line-number of an internal block within a function. */ /* Describe the end line-number of an internal block within a function. */
void static void
sdbout_end_block (file, line, n) sdbout_end_block (line, n)
FILE *file ATTRIBUTE_UNUSED;
unsigned int line; unsigned int line;
unsigned int n ATTRIBUTE_UNUSED; unsigned int n ATTRIBUTE_UNUSED;
{ {
...@@ -1525,6 +1520,26 @@ sdbout_end_block (file, line, n) ...@@ -1525,6 +1520,26 @@ sdbout_end_block (file, line, n)
PUT_SDB_BLOCK_END (line - sdb_begin_function_line); PUT_SDB_BLOCK_END (line - sdb_begin_function_line);
} }
static void
sdbout_source_line (filename, note)
const char *filename ATTRIBUTE_UNUSED;
rtx note;
{
unsigned int line = NOTE_LINE_NUMBER (note);
/* COFF relative line numbers must be positive. */
if (line > sdb_begin_function_line)
{
#ifdef ASM_OUTPUT_SOURCE_LINE
ASM_OUTPUT_SOURCE_LINE (asm_out_file, line);
#else
fprintf (asm_out_file, "\t.ln\t%d\n",
((sdb_begin_function_line > -1)
? line - sdb_begin_function_line : 1));
#endif
}
}
/* Output sdb info for the current function name. /* Output sdb info for the current function name.
Called from assemble_start_function. */ Called from assemble_start_function. */
...@@ -1553,9 +1568,9 @@ sdbout_begin_function (line) ...@@ -1553,9 +1568,9 @@ sdbout_begin_function (line)
/* Called at end of function (before epilogue). /* Called at end of function (before epilogue).
Describe end of outermost block. */ Describe end of outermost block. */
void static void
sdbout_end_function (line) sdbout_end_function (line)
int line; unsigned int line;
{ {
#ifdef SDB_ALLOW_FORWARD_REFERENCES #ifdef SDB_ALLOW_FORWARD_REFERENCES
sdbout_dequeue_anonymous_types (); sdbout_dequeue_anonymous_types ();
...@@ -1571,11 +1586,20 @@ sdbout_end_function (line) ...@@ -1571,11 +1586,20 @@ sdbout_end_function (line)
/* Output sdb info for the absolute end of a function. /* Output sdb info for the absolute end of a function.
Called after the epilogue is output. */ Called after the epilogue is output. */
void static void
sdbout_end_epilogue () sdbout_end_epilogue ()
{ {
PUT_SDB_EPILOGUE_END const char *name
(IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl))); = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl));
#ifdef PUT_SDB_EPILOGUE_END
PUT_SDB_EPILOGUE_END (name);
#else
fprintf (asm_out_file, "\t.def\t");
assemble_name (asm_out_file, name);
fprintf (asm_out_file, "%s\t.val\t.%s\t.scl\t-1%s\t.endef\n",
SDB_DELIM, SDB_DELIM, SDB_DELIM);
#endif
} }
/* Output sdb info for the given label. Called only if LABEL_NAME (insn) /* Output sdb info for the given label. Called only if LABEL_NAME (insn)
...@@ -1628,8 +1652,7 @@ sdbout_end_source_file (line) ...@@ -1628,8 +1652,7 @@ sdbout_end_source_file (line)
/* Set up for SDB output at the start of compilation. */ /* Set up for SDB output at the start of compilation. */
static void static void
sdbout_init (asm_file, input_file_name) sdbout_init (input_file_name)
FILE *asm_file ATTRIBUTE_UNUSED;
const char *input_file_name ATTRIBUTE_UNUSED; const char *input_file_name ATTRIBUTE_UNUSED;
{ {
#ifdef MIPS_DEBUGGING_INFO #ifdef MIPS_DEBUGGING_INFO
......
...@@ -19,14 +19,11 @@ the Free Software Foundation, 59 Temple Place - Suite 330, ...@@ -19,14 +19,11 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
extern void sdbout_begin_function PARAMS ((int)); extern void sdbout_begin_function PARAMS ((int));
extern void sdbout_end_function PARAMS ((int));
extern void sdbout_label PARAMS ((rtx)); extern void sdbout_label PARAMS ((rtx));
extern void sdbout_symbol PARAMS ((tree, int)); extern void sdbout_symbol PARAMS ((tree, int));
extern void sdbout_toplevel_data PARAMS ((tree)); extern void sdbout_toplevel_data PARAMS ((tree));
extern void sdbout_types PARAMS ((tree)); extern void sdbout_types PARAMS ((tree));
extern void sdbout_end_epilogue PARAMS ((void));
extern void sdbout_mark_begin_function PARAMS ((void)); extern void sdbout_mark_begin_function PARAMS ((void));
...@@ -2343,7 +2343,7 @@ compile_file (name) ...@@ -2343,7 +2343,7 @@ compile_file (name)
dwarf2out_frame_init (); dwarf2out_frame_init ();
#endif #endif
(*debug_hooks->init) (asm_out_file, main_input_filename); (*debug_hooks->init) (main_input_filename);
timevar_pop (TV_SYMOUT); timevar_pop (TV_SYMOUT);
/* Initialize yet another pass. */ /* Initialize yet another pass. */
...@@ -2422,7 +2422,7 @@ compile_file (name) ...@@ -2422,7 +2422,7 @@ compile_file (name)
dwarf2out_frame_finish (); dwarf2out_frame_finish ();
#endif #endif
(*debug_hooks->finish) (asm_out_file, main_input_filename); (*debug_hooks->finish) (main_input_filename);
timevar_pop (TV_SYMOUT); timevar_pop (TV_SYMOUT);
/* Output some stuff at end of file if nec. */ /* Output some stuff at end of file if nec. */
...@@ -3752,7 +3752,7 @@ rest_of_compilation (decl) ...@@ -3752,7 +3752,7 @@ rest_of_compilation (decl)
assemble_start_function (decl, fnname); assemble_start_function (decl, fnname);
final_start_function (insns, asm_out_file, optimize); final_start_function (insns, asm_out_file, optimize);
final (insns, asm_out_file, optimize, 0); final (insns, asm_out_file, optimize, 0);
final_end_function (insns, asm_out_file, optimize); final_end_function ();
#ifdef IA64_UNWIND_INFO #ifdef IA64_UNWIND_INFO
/* ??? The IA-64 ".handlerdata" directive must be issued before /* ??? The IA-64 ".handlerdata" directive must be issued before
......
...@@ -2924,10 +2924,6 @@ extern void dwarf2out_return_reg PARAMS ((const char *, unsigned)); ...@@ -2924,10 +2924,6 @@ extern void dwarf2out_return_reg PARAMS ((const char *, unsigned));
extern void dwarf2out_begin_prologue PARAMS ((void)); extern void dwarf2out_begin_prologue PARAMS ((void));
/* Output a marker (i.e. a label) for the absolute end of the generated
code for a function definition. */
extern void dwarf2out_end_epilogue PARAMS ((void));
/* Redefine abort to report an internal error w/o coredump, and /* Redefine abort to report an internal error w/o coredump, and
reporting the location of the error in the source file. This logic reporting the location of the error in the source file. This logic
......
...@@ -308,14 +308,13 @@ xcoffout_source_file (file, filename, inline_p) ...@@ -308,14 +308,13 @@ xcoffout_source_file (file, filename, inline_p)
for source file FILENAME and line number NOTE. */ for source file FILENAME and line number NOTE. */
void void
xcoffout_source_line (file, filename, note) xcoffout_source_line (filename, note)
FILE *file;
const char *filename; const char *filename;
rtx note; rtx note;
{ {
xcoffout_source_file (file, filename, RTX_INTEGRATED_P (note)); xcoffout_source_file (asm_out_file, filename, RTX_INTEGRATED_P (note));
ASM_OUTPUT_SOURCE_LINE (file, NOTE_LINE_NUMBER (note)); ASM_OUTPUT_SOURCE_LINE (asm_out_file, NOTE_LINE_NUMBER (note));
} }
/* Output the symbols defined in block number DO_BLOCK. /* Output the symbols defined in block number DO_BLOCK.
...@@ -368,17 +367,16 @@ xcoffout_block (block, depth, args) ...@@ -368,17 +367,16 @@ xcoffout_block (block, depth, args)
if the count starts at 0 for the outermost one. */ if the count starts at 0 for the outermost one. */
void void
xcoffout_begin_block (file, line, n) xcoffout_begin_block (line, n)
FILE *file; unsigned int line;
int line; unsigned int n;
int n;
{ {
tree decl = current_function_decl; tree decl = current_function_decl;
/* The IBM AIX compiler does not emit a .bb for the function level scope, /* The IBM AIX compiler does not emit a .bb for the function level scope,
so we avoid it here also. */ so we avoid it here also. */
if (n != 1) if (n != 1)
ASM_OUTPUT_LBB (file, line, n); ASM_OUTPUT_LBB (asm_out_file, line, n);
do_block = n; do_block = n;
xcoffout_block (DECL_INITIAL (decl), 0, DECL_ARGUMENTS (decl)); xcoffout_block (DECL_INITIAL (decl), 0, DECL_ARGUMENTS (decl));
...@@ -387,13 +385,12 @@ xcoffout_begin_block (file, line, n) ...@@ -387,13 +385,12 @@ xcoffout_begin_block (file, line, n)
/* Describe the end line-number of an internal block within a function. */ /* Describe the end line-number of an internal block within a function. */
void void
xcoffout_end_block (file, line, n) xcoffout_end_block (line, n)
FILE *file; unsigned int line;
int line; unsigned int n;
int n;
{ {
if (n != 1) if (n != 1)
ASM_OUTPUT_LBE (file, line, n); ASM_OUTPUT_LBE (asm_out_file, line, n);
} }
/* Called at beginning of function (before prologue). /* Called at beginning of function (before prologue).
...@@ -462,19 +459,17 @@ xcoffout_begin_function (file, last_linenum) ...@@ -462,19 +459,17 @@ xcoffout_begin_function (file, last_linenum)
Describe end of outermost block. */ Describe end of outermost block. */
void void
xcoffout_end_function (file, last_linenum) xcoffout_end_function (last_linenum)
FILE *file; unsigned int last_linenum;
int last_linenum;
{ {
ASM_OUTPUT_LFE (file, last_linenum); ASM_OUTPUT_LFE (asm_out_file, last_linenum);
} }
/* Output xcoff info for the absolute end of a function. /* Output xcoff info for the absolute end of a function.
Called after the epilogue is output. */ Called after the epilogue is output. */
void void
xcoffout_end_epilogue (file) xcoffout_end_epilogue ()
FILE *file;
{ {
/* We need to pass the correct function size to .function, otherwise, /* We need to pass the correct function size to .function, otherwise,
the xas assembler can't figure out the correct size for the function the xas assembler can't figure out the correct size for the function
...@@ -484,7 +479,7 @@ xcoffout_end_epilogue (file) ...@@ -484,7 +479,7 @@ xcoffout_end_epilogue (file)
const char *fname = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0); const char *fname = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0);
if (*fname == '*') if (*fname == '*')
++fname; ++fname;
fprintf (file, "FE.."); fprintf (asm_out_file, "FE..");
ASM_OUTPUT_LABEL (file, fname); ASM_OUTPUT_LABEL (asm_out_file, fname);
} }
#endif /* XCOFF_DEBUGGING_INFO */ #endif /* XCOFF_DEBUGGING_INFO */
...@@ -200,10 +200,10 @@ extern const char *xcoff_lastfile; ...@@ -200,10 +200,10 @@ extern const char *xcoff_lastfile;
extern int stab_to_sclass PARAMS ((int)); extern int stab_to_sclass PARAMS ((int));
#ifdef BUFSIZ #ifdef BUFSIZ
extern void xcoffout_begin_function PARAMS ((FILE *, int)); extern void xcoffout_begin_function PARAMS ((FILE *, int));
extern void xcoffout_begin_block PARAMS ((FILE *, int, int)); extern void xcoffout_begin_block PARAMS ((unsigned, unsigned));
extern void xcoffout_end_epilogue PARAMS ((FILE *)); extern void xcoffout_end_epilogue PARAMS ((void));
extern void xcoffout_end_function PARAMS ((FILE *, int)); extern void xcoffout_end_function PARAMS ((unsigned int));
extern void xcoffout_end_block PARAMS ((FILE *, int, int)); extern void xcoffout_end_block PARAMS ((unsigned, unsigned));
#endif /* BUFSIZ */ #endif /* BUFSIZ */
#ifdef TREE_CODE #ifdef TREE_CODE
...@@ -215,6 +215,6 @@ extern void xcoffout_declare_function PARAMS ((FILE *, tree, const char *)); ...@@ -215,6 +215,6 @@ extern void xcoffout_declare_function PARAMS ((FILE *, tree, const char *));
#ifdef RTX_CODE #ifdef RTX_CODE
#ifdef BUFSIZ #ifdef BUFSIZ
extern void xcoffout_source_line PARAMS ((FILE *, const char *, rtx)); extern void xcoffout_source_line PARAMS ((const char *, rtx));
#endif /* BUFSIZ */ #endif /* BUFSIZ */
#endif /* RTX_CODE */ #endif /* RTX_CODE */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment