&& getc (finput) == 'e'
&& ((c = getc (finput)) == ' ' || c == '\t' || c == '\n'))
{
-#ifdef DWARF_DEBUGGING_INFO
- if (c != '\n'
- && (debug_info_level == DINFO_LEVEL_VERBOSE)
- && (write_symbols == DWARF_DEBUG))
- dwarfout_define (lineno, get_directive_line (finput));
-#endif /* DWARF_DEBUGGING_INFO */
+ if (c != '\n')
+ debug_define (lineno, get_directive_line (finput));
goto skipline;
}
}
&& getc (finput) == 'f'
&& ((c = getc (finput)) == ' ' || c == '\t' || c == '\n'))
{
-#ifdef DWARF_DEBUGGING_INFO
- if (c != '\n'
- && (debug_info_level == DINFO_LEVEL_VERBOSE)
- && (write_symbols == DWARF_DEBUG))
- dwarfout_undef (lineno, get_directive_line (finput));
-#endif /* DWARF_DEBUGGING_INFO */
+ if (c != '\n')
+ debug_undef (lineno, get_directive_line (finput));
goto skipline;
}
}
p->name = input_filename;
input_file_stack = p;
input_file_stack_tick++;
-#ifdef DBX_DEBUGGING_INFO
- if (write_symbols == DBX_DEBUG)
- dbxout_start_new_source_file (input_filename);
-#endif
-#ifdef DWARF_DEBUGGING_INFO
- if (debug_info_level == DINFO_LEVEL_VERBOSE
- && write_symbols == DWARF_DEBUG)
- dwarfout_start_new_source_file (input_filename);
-#endif /* DWARF_DEBUGGING_INFO */
-
+ debug_start_source_file (input_filename);
used_up = 1;
}
else if (TREE_INT_CST_LOW (yylval.ttype) == 2)
input_file_stack = p->next;
free (p);
input_file_stack_tick++;
-#ifdef DBX_DEBUGGING_INFO
- if (write_symbols == DBX_DEBUG)
- dbxout_resume_previous_source_file ();
-#endif
-#ifdef DWARF_DEBUGGING_INFO
- if (debug_info_level == DINFO_LEVEL_VERBOSE
- && write_symbols == DWARF_DEBUG)
- dwarfout_resume_previous_source_file (input_file_stack->line);
-#endif /* DWARF_DEBUGGING_INFO */
+ debug_end_source_file (input_file_stack->line);
}
else
error ("#-lines for entering and leaving files don't match");
%{mabi=64: -D__mips64} \
%{!mabi*: -D__mips64}"
-/* Irix 6 uses DWARF. */
-#define DWARF_DEBUGGING_INFO
-#define DWARF_VERSION 2
+/* Irix 6 uses DWARF-2. */
+#define DWARF2_DEBUGGING_INFO
#define MIPS_DEBUGGING_INFO
#undef PREFERRED_DEBUGGING_TYPE
-#define PREFERRED_DEBUGGING_TYPE DWARF_DEBUG
+#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
/* The size in bytes of a DWARF field indicating an offset or length
relative to a debug info section, specified to be 4 bytes in the DWARF-2
#define LINK_SPEC "\
%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \
%{bestGnum} %{shared} %{non_shared} \
-%{call_shared} %{no_archive} %{exact_version} \
+%{call_shared} %{no_archive} %{exact_version} %{w} \
%{!shared: %{!non_shared: %{!call_shared: -call_shared -no_unresolved}}} \
%{rpath} -init __do_global_ctors -fini __do_global_dtors \
%{shared:-hidden_symbol __do_global_ctors,__do_global_dtors} \
#define MIPS_DEBUGGING_INFO /* MIPS specific debugging info */
#ifndef PREFERRED_DEBUGGING_TYPE /* assume SDB_DEBUGGING_INFO */
-#define PREFERRED_DEBUGGING_TYPE ((len > 1 && !strncmp (str, "ggdb", len)) ? DBX_DEBUG : SDB_DEBUG)
+#define PREFERRED_DEBUGGING_TYPE ((!strncmp (str, "ggdb", 4)) ? DBX_DEBUG : SDB_DEBUG)
#endif
/* By default, turn on GDB extensions. */
#define DWARF_DEBUGGING_INFO
+/* All ELF targets can support DWARF-2. */
+
+#define DWARF2_DEBUGGING_INFO
+
/* The numbers used to denote specific machine registers in the System V
Release 4 DWARF debugging information are quite likely to be totally
different from the numbers used in BSD stabs debugging information
#include "config.h"
-#ifndef DWARF_VERSION
-#define DWARF_VERSION 1
-#endif
-#if defined (DWARF_DEBUGGING_INFO) && (DWARF_VERSION == 2)
+#ifdef DWARF2_DEBUGGING_INFO
#include <stdio.h>
#include "dwarf2.h"
#include "tree.h"
#define DWARF_OFFSET_SIZE 4
#endif
+#define DWARF_VERSION 2
+
/* Fixed size portion of the DWARF compilation unit header. */
#define DWARF_COMPILE_UNIT_HEADER_SIZE (2 * DWARF_OFFSET_SIZE + 3)
#define FILE_TABLE_INCREMENT 64
/* Local pointer to the name of the main input file. Initialized in
- dwarfout_init. */
+ dwarf2out_init. */
static char *primary_filename;
/* For Dwarf output, we must assign lexical-blocks id numbers in the order in
(at debug-time) will show the function as having been called with the
*new* value rather than the value which was originally passed in. This
happens rarely enough that it is not a major problem, but it *is* a
- problem, and I'd like to fix it. A future version of dwarfout.c may
+ problem, and I'd like to fix it. A future version of dwarf2out.c may
generate two additional attributes for any given DW_TAG_formal_parameter
DIE which will describe the "passed type" and the "passed location" for
the given formal parameter in addition to the attributes we now generate
/* These routines generate the internnal representation of the DIE's for
the compilation unit. Debugging information is collected by walking
- the declaration trees passed in from dwarfout_file_scope_decl(). */
+ the declaration trees passed in from dwarf2out_file_scope_decl(). */
static void
gen_array_type_die (type, context_die)
\f
/***************** Debug Information Generation Hooks ***********************/
void
-dwarfout_file_scope_decl (decl, set_finalizing)
+dwarf2out_file_scope_decl (decl, set_finalizing)
register tree decl;
register int set_finalizing;
{
/* Output a marker (i.e. a label) for the beginning of the generated code for
a lexical block. */
void
-dwarfout_begin_block (blocknum)
+dwarf2out_begin_block (blocknum)
register unsigned blocknum;
{
function_section (current_function_decl);
/* Output a marker (i.e. a label) for the end of the generated code for a
lexical block. */
void
-dwarfout_end_block (blocknum)
+dwarf2out_end_block (blocknum)
register unsigned blocknum;
{
function_section (current_function_decl);
/* Output a marker (i.e. a label) at a point in the assembly code which
corresponds to a given source level label. */
void
-dwarfout_label (insn)
+dwarf2out_label (insn)
register rtx insn;
{
char label[MAX_ARTIFICIAL_LABEL_BYTES];
/* Output a marker (i.e. a label) for the beginning of a function, before
the prologue. */
void
-dwarfout_begin_prologue ()
+dwarf2out_begin_prologue ()
{
char label[MAX_ARTIFICIAL_LABEL_BYTES];
register dw_fde_ref fde;
the real body of the function begins (after parameters have been moved to
their home locations). */
void
-dwarfout_begin_function ()
+dwarf2out_begin_function ()
{
char label[MAX_ARTIFICIAL_LABEL_BYTES];
register long int offset;
/* 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). */
void
-dwarfout_end_function ()
+dwarf2out_end_function ()
{
dw_fde_ref fde;
char label[MAX_ARTIFICIAL_LABEL_BYTES];
for a function definition. This gets called *after* the epilogue code has
been generated. */
void
-dwarfout_end_epilogue ()
+dwarf2out_end_epilogue ()
{
dw_fde_ref fde;
char label[MAX_ARTIFICIAL_LABEL_BYTES];
}
/* Lookup a filename (in the list of filenames that we know about here in
- dwarfout.c) and return its "index". The index of each (known) filename is
+ dwarf2out.c) and return its "index". The index of each (known) filename is
just a unique number which is associated with only that one filename.
We need such numbers for the sake of generating labels
(in the .debug_sfnames section) and references to those
and record information relating to this source line, in
'line_info_table' for later output of the .debug_line section. */
void
-dwarfout_line (filename, line)
+dwarf2out_line (filename, line)
register char *filename;
register unsigned line;
{
/* Record the beginning of a new source file, for later output
of the .debug_macinfo section. At present, unimplemented. */
void
-dwarfout_start_new_source_file (filename)
+dwarf2out_start_source_file (filename)
register char *filename;
{
}
-/* Record the resumption of a source file, for later output
+/* Record the end of a source file, for later output
of the .debug_macinfo section. At present, unimplemented. */
void
-dwarfout_resume_previous_source_file (lineno)
- register unsigned lineno;
+dwarf2out_end_source_file ()
{
}
the tail part of the directive line, i.e. the part which is past the
initial whitespace, #, whitespace, directive-name, whitespace part. */
void
-dwarfout_define (lineno, buffer)
+dwarf2out_define (lineno, buffer)
register unsigned lineno;
register char *buffer;
{
static int initialized = 0;
if (!initialized)
{
- dwarfout_start_new_source_file (primary_filename);
+ dwarf2out_start_source_file (primary_filename);
initialized = 1;
}
}
the tail part of the directive line, i.e. the part which is past the
initial whitespace, #, whitespace, directive-name, whitespace part. */
void
-dwarfout_undef (lineno, buffer)
+dwarf2out_undef (lineno, buffer)
register unsigned lineno;
register char *buffer;
{
/* Set up for Dwarf output at the start of compilation. */
void
-dwarfout_init (asm_out_file, main_input_filename)
+dwarf2out_init (asm_out_file, main_input_filename)
register FILE *asm_out_file;
register char *main_input_filename;
{
/* Output stuff that dwarf requires at the end of every file,
and generate the DWARF-2 debugging info. */
void
-dwarfout_finish ()
+dwarf2out_finish ()
{
/* Traverse the DIE tree and add sibling attributes to those DIE's
that have children. */
output_aranges ();
}
}
-#endif /* DWARF_DEBUGGING_INFO && DWARF_VERSION == 2 */
+#endif /* DWARF2_DEBUGGING_INFO */
#include "config.h"
-#ifndef DWARF_VERSION
-#define DWARF_VERSION 1
-#endif
-#if defined (DWARF_DEBUGGING_INFO) && (DWARF_VERSION != 2)
+#ifdef DWARF_DEBUGGING_INFO
#include <stdio.h>
#include "dwarf.h"
#include "tree.h"
}
}
-#endif /* DWARF_DEBUGGING_INFO && DWARF_VERSION != 2 */
+#endif /* DWARF_DEBUGGING_INFO */
last_linenum = high_block_linenum = high_function_linenum
= NOTE_LINE_NUMBER (first);
-#if defined (DWARF_DEBUGGING_INFO) && DWARF_VERSION == 2
+#ifdef DWARF2_DEBUGGING_INFO
/* Output DWARF definition of the function. */
- if (write_symbols == DWARF_DEBUG)
- dwarfout_begin_prologue ();
+ if (write_symbols == DWARF2_DEBUG)
+ dwarf2out_begin_prologue ();
#endif
/* For SDB and XCOFF, the function beginning must be marked between
dwarfout_end_function ();
#endif
+#ifdef DWARF2_DEBUGGING_INFO
+ if (write_symbols == DWARF2_DEBUG)
+ dwarf2out_end_function ();
+#endif
+
#ifdef XCOFF_DEBUGGING_INFO
if (write_symbols == XCOFF_DEBUG)
xcoffout_end_function (file, high_function_linenum);
dwarfout_end_epilogue ();
#endif
+#ifdef DWARF2_DEBUGGING_INFO
+ if (write_symbols == DWARF2_DEBUG)
+ dwarf2out_end_epilogue ();
+#endif
+
#ifdef XCOFF_DEBUGGING_INFO
if (write_symbols == XCOFF_DEBUG)
xcoffout_end_epilogue (file);
must be after the prologue. */
if (write_symbols == DWARF_DEBUG)
dwarfout_begin_function ();
+#endif
+#ifdef DWARF2_DEBUGGING_INFO
+ /* This outputs a marker where the function body starts, so it
+ must be after the prologue. */
+ if (write_symbols == DWARF2_DEBUG)
+ dwarf2out_begin_function ();
#endif
break;
}
if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_BEG
&& (debug_info_level == DINFO_LEVEL_NORMAL
|| debug_info_level == DINFO_LEVEL_VERBOSE
-#ifdef DWARF_DEBUGGING_INFO
|| write_symbols == DWARF_DEBUG
-#endif
- )
- )
+ || write_symbols == DWARF2_DEBUG))
{
/* Beginning of a symbol-block. Assign it a sequence number
and push the number onto the stack PENDING_BLOCKS. */
if (write_symbols == DWARF_DEBUG)
dwarfout_begin_block (next_block_index);
#endif
+#ifdef DWARF2_DEBUGGING_INFO
+ if (write_symbols == DWARF2_DEBUG)
+ dwarf2out_begin_block (next_block_index);
+#endif
next_block_index++;
}
else if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_END
&& (debug_info_level == DINFO_LEVEL_NORMAL
|| debug_info_level == DINFO_LEVEL_VERBOSE
-#ifdef DWARF_DEBUGGING_INFO
|| write_symbols == DWARF_DEBUG
-#endif
- )
- )
+ || write_symbols == DWARF2_DEBUG))
{
/* End of a symbol-block. Pop its sequence number off
PENDING_BLOCKS and output debugging info based on that. */
#ifdef DWARF_DEBUGGING_INFO
if (write_symbols == DWARF_DEBUG && block_depth >= 0)
dwarfout_end_block (pending_blocks[block_depth]);
+#endif
+#ifdef DWARF2_DEBUGGING_INFO
+ if (write_symbols == DWARF2_DEBUG && block_depth >= 0)
+ dwarf2out_end_block (pending_blocks[block_depth]);
#endif
}
else if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_DELETED_LABEL
#ifdef DWARF_DEBUGGING_INFO
if (write_symbols == DWARF_DEBUG)
dwarfout_label (insn);
+#endif
+#ifdef DWARF2_DEBUGGING_INFO
+ if (write_symbols == DWARF2_DEBUG)
+ dwarf2out_label (insn);
#endif
}
else if (NOTE_LINE_NUMBER (insn) > 0)
#ifdef DWARF_DEBUGGING_INFO
if (write_symbols == DWARF_DEBUG && LABEL_NAME (insn))
dwarfout_label (insn);
+#endif
+#ifdef DWARF2_DEBUGGING_INFO
+ if (write_symbols == DWARF2_DEBUG && LABEL_NAME (insn))
+ dwarf2out_label (insn);
#endif
if (app_on)
{
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
}
}
\f
DBX_DEBUG, /* Write BSD .stabs for DBX (using dbxout.c). */
SDB_DEBUG, /* Write COFF for (old) SDB (using sdbout.c). */
DWARF_DEBUG, /* Write Dwarf debug info (using dwarfout.c). */
+ DWARF2_DEBUG, /* Write Dwarf v2 debug info (using dwarf2out.c). */
XCOFF_DEBUG /* Write IBM/Xcoff debug info (using dbxout.c). */
};
PREFERRED_DEBUGGING_TYPE to choose a format in a system-dependent way.
This is one long line cause VAXC can't handle a \-newline. */
-#if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) + defined (DWARF_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO))
+#if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) + defined (DWARF_DEBUGGING_INFO) + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO))
#ifndef PREFERRED_DEBUGGING_TYPE
You Lose! You must define PREFERRED_DEBUGGING_TYPE!
#endif /* no PREFERRED_DEBUGGING_TYPE */
#ifdef DWARF_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE DWARF_DEBUG
#endif
+#ifdef DWARF2_DEBUGGING_INFO
+#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
+#endif
#ifdef XCOFF_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG
#endif
if (write_symbols == DWARF_DEBUG)
TIMEVAR (symout_time, dwarfout_init (asm_out_file, main_input_filename));
#endif
+#ifdef DWARF2_DEBUGGING_INFO
+ if (write_symbols == DWARF2_DEBUG)
+ TIMEVAR (symout_time, dwarf2out_init (asm_out_file, main_input_filename));
+#endif
/* Initialize yet another pass. */
if (write_symbols == DWARF_DEBUG
&& (TREE_CODE (decl) != FUNCTION_DECL || !DECL_INITIAL (decl)))
TIMEVAR (symout_time, dwarfout_file_scope_decl (decl, 1));
+#endif
+#ifdef DWARF2_DEBUGGING_INFO
+ /* Output DWARF2 information for file-scope tentative data object
+ declarations, file-scope (extern) function declarations (which
+ had no corresponding body) and file-scope tagged type declarations
+ and definitions which have not yet been forced out. */
+
+ if (write_symbols == DWARF2_DEBUG
+ && (TREE_CODE (decl) != FUNCTION_DECL || !DECL_INITIAL (decl)))
+ TIMEVAR (symout_time, dwarf2out_file_scope_decl (decl, 1));
#endif
}
}
});
#endif
+#ifdef DWARF2_DEBUGGING_INFO
+ if (write_symbols == DWARF2_DEBUG)
+ TIMEVAR (symout_time,
+ {
+ dwarf2out_finish ();
+ });
+#endif
+
/* Output some stuff at end of file if nec. */
if (!output_bytecode)
if (write_symbols == DWARF_DEBUG && toplev)
TIMEVAR (symout_time, dwarfout_file_scope_decl (TYPE_STUB_DECL (type), 0));
#endif
+#ifdef DWARF2_DEBUGGING_INFO
+ /* Don't write out function-scope types here. */
+ if (write_symbols == DWARF2_DEBUG && toplev)
+ TIMEVAR (symout_time, dwarf2out_file_scope_decl (TYPE_STUB_DECL (type), 0));
+#endif
}
/* This is called from finish_function (within yyparse)
TIMEVAR (symout_time, dwarfout_file_scope_decl (decl, 0));
set_decl_abstract_flags (decl, 0);
}
+#endif
+#ifdef DWARF2_DEBUGGING_INFO
+ /* Generate the DWARF2 info for the "abstract" instance
+ of a function which we may later generate inlined and/or
+ out-of-line instances of. */
+ if (write_symbols == DWARF2_DEBUG)
+ {
+ set_decl_abstract_flags (decl, 1);
+ TIMEVAR (symout_time, dwarf2out_file_scope_decl (decl, 0));
+ set_decl_abstract_flags (decl, 0);
+ }
#endif
TIMEVAR (integration_time, save_for_inline_nocopy (decl));
RTX_INTEGRATED_P (DECL_SAVED_INSNS (decl)) = inlineable;
TIMEVAR (symout_time, dwarfout_file_scope_decl (decl, 0));
set_decl_abstract_flags (decl, 0);
}
+#endif
+#ifdef DWARF2_DEBUGGING_INFO
+ /* Generate the DWARF2 info for the "abstract" instance of
+ a function which we will generate an out-of-line instance
+ of almost immediately (and which we may also later generate
+ various inlined instances of). */
+ if (write_symbols == DWARF2_DEBUG)
+ {
+ set_decl_abstract_flags (decl, 1);
+ TIMEVAR (symout_time, dwarf2out_file_scope_decl (decl, 0));
+ set_decl_abstract_flags (decl, 0);
+ }
#endif
saved_block_tree = DECL_INITIAL (decl);
saved_arguments = DECL_ARGUMENTS (decl);
TIMEVAR (symout_time, dwarfout_file_scope_decl (decl, 0));
#endif
+#ifdef DWARF2_DEBUGGING_INFO
+ if (write_symbols == DWARF2_DEBUG)
+ TIMEVAR (symout_time, dwarf2out_file_scope_decl (decl, 0));
+#endif
+
exit_rest_of_compilation:
/* In case the function was not output,
}
else if (str[0] == 'g')
{
- char *p = str + 1;
- char *q;
unsigned len;
unsigned level;
/* A lot of code assumes write_symbols == NO_DEBUG if the
{ "gstabs+", DBX_DEBUG, 1 },
#endif
#ifdef DWARF_DEBUGGING_INFO
+ { "gdwarf-1", DWARF_DEBUG, 0 },
+ { "gdwarf-1+", DWARF_DEBUG, 1 },
+#endif
+#ifdef DWARF2_DEBUGGING_INFO
+ { "gdwarf-2", DWARF2_DEBUG, 0 },
+#endif
+#if defined (DWARF_DEBUGGING_INFO) || defined (DWARF2_DEBUGGING_INFO)
+#if PREFERRED_DEBUGGING_TYPE == DWARF_DEBUG || !defined (DWARF2_DEBUGGING_INFO)
{ "gdwarf", DWARF_DEBUG, 0 },
{ "gdwarf+", DWARF_DEBUG, 1 },
+#else
+ { "gdwarf", DWARF2_DEBUG, 0 },
+#endif
#endif
#ifdef XCOFF_DEBUGGING_INFO
{ "gxcoff", XCOFF_DEBUG, 0 },
};
/* Indexed by enum debug_info_type. */
static char *debug_type_names[] = {
- "none", "stabs", "coff", "dwarf", "xcoff"
+ "none", "stabs", "coff", "dwarf-1", "dwarf-2", "xcoff"
};
- while (*p && (*p < '0' || *p > '9'))
- p++;
- len = p - str;
- q = p;
- while (*q && (*q >= '0' && *q <= '9'))
- q++;
- if (*p)
- level = atoi (p);
- else
- level = 2; /* default debugging info level */
- if (*q || level > 3)
- {
- warning ("invalid debug level specification in option: `-%s'",
- str);
- /* ??? This error message is incorrect in the case of
- -g4 -g. */
- warning ("no debugging information will be generated");
- level = 0;
- }
-
/* Look up STR in the table. */
for (da = debug_args; da->arg; da++)
{
- if (! strncmp (str, da->arg, len))
+ if (! strncmp (str, da->arg, strlen (da->arg)))
{
enum debug_info_type type = da->debug_type;
- /* ??? A few targets use STR and LEN in the
+ char *p, *q;
+
+ p = str + strlen (da->arg);
+ if (*p && (*p < '0' || *p > '9'))
+ continue;
+ q = p;
+ while (*q && (*q >= '0' && *q <= '9'))
+ q++;
+ if (*p)
+ level = atoi (p);
+ else
+ level = 2; /* default debugging info level */
+ if (*q || level > 3)
+ {
+ warning ("invalid debug level specification in option: `-%s'",
+ str);
+ /* ??? This error message is incorrect in the case of
+ -g4 -g. */
+ warning ("no debugging information will be generated");
+ level = 0;
+ }
+
+ /* ??? A few targets use STR in the
definition of PREFERRED_DEBUGGING_TYPE! */
if (type == NO_DEBUG)
type = PREFERRED_DEBUGGING_TYPE;
fprintf (file, "%s", term);
}
+
+/* Record the beginning of a new source file, named FILENAME. */
+
+void
+debug_start_source_file (filename)
+ register char *filename;
+{
+#ifdef DBX_DEBUGGING_INFO
+ if (write_symbols == DBX_DEBUG)
+ dbxout_start_new_source_file (filename);
+#endif
+#ifdef DWARF_DEBUGGING_INFO
+ if (debug_info_level == DINFO_LEVEL_VERBOSE
+ && write_symbols == DWARF_DEBUG)
+ dwarfout_start_new_source_file (filename);
+#endif /* DWARF_DEBUGGING_INFO */
+#ifdef DWARF2_DEBUGGING_INFO
+ if (debug_info_level == DINFO_LEVEL_VERBOSE
+ && write_symbols == DWARF2_DEBUG)
+ dwarf2out_start_source_file (filename);
+#endif /* DWARF2_DEBUGGING_INFO */
+}
+
+/* Record the resumption of a source file. LINENO is the line number in
+ the source file we are returning to. */
+
+void
+debug_end_source_file (lineno)
+ register unsigned lineno;
+{
+#ifdef DBX_DEBUGGING_INFO
+ if (write_symbols == DBX_DEBUG)
+ dbxout_resume_previous_source_file ();
+#endif
+#ifdef DWARF_DEBUGGING_INFO
+ if (debug_info_level == DINFO_LEVEL_VERBOSE
+ && write_symbols == DWARF_DEBUG)
+ dwarfout_resume_previous_source_file (lineno);
+#endif /* DWARF_DEBUGGING_INFO */
+#ifdef DWARF2_DEBUGGING_INFO
+ if (debug_info_level == DINFO_LEVEL_VERBOSE
+ && write_symbols == DWARF2_DEBUG)
+ dwarf2out_end_source_file ();
+#endif /* DWARF2_DEBUGGING_INFO */
+}
+
+/* Called from check_newline in c-parse.y. The `buffer' parameter contains
+ the tail part of the directive line, i.e. the part which is past the
+ initial whitespace, #, whitespace, directive-name, whitespace part. */
+
+void
+debug_define (lineno, buffer)
+ register unsigned lineno;
+ register char *buffer;
+{
+#ifdef DWARF_DEBUGGING_INFO
+ if (debug_info_level == DINFO_LEVEL_VERBOSE
+ && write_symbols == DWARF_DEBUG)
+ dwarfout_define (lineno, buffer);
+#endif /* DWARF_DEBUGGING_INFO */
+#ifdef DWARF2_DEBUGGING_INFO
+ if (debug_info_level == DINFO_LEVEL_VERBOSE
+ && write_symbols == DWARF2_DEBUG)
+ dwarf2out_define (lineno, buffer);
+#endif /* DWARF2_DEBUGGING_INFO */
+}
+
+/* Called from check_newline in c-parse.y. The `buffer' parameter contains
+ the tail part of the directive line, i.e. the part which is past the
+ initial whitespace, #, whitespace, directive-name, whitespace part. */
+
+void
+debug_undef (lineno, buffer)
+ register unsigned lineno;
+ register char *buffer;
+{
+#ifdef DWARF_DEBUGGING_INFO
+ if (debug_info_level == DINFO_LEVEL_VERBOSE
+ && write_symbols == DWARF_DEBUG)
+ dwarfout_undef (lineno, buffer);
+#endif /* DWARF_DEBUGGING_INFO */
+#ifdef DWARF2_DEBUGGING_INFO
+ if (debug_info_level == DINFO_LEVEL_VERBOSE
+ && write_symbols == DWARF2_DEBUG)
+ dwarf2out_undef (lineno, buffer);
+#endif /* DWARF2_DEBUGGING_INFO */
+}
if (write_symbols == DWARF_DEBUG && top_level
&& DECL_CONTEXT (decl))
dwarfout_file_scope_decl (decl, 0);
+#endif
+#ifdef DWARF2_DEBUGGING_INFO
+ if (write_symbols == DWARF2_DEBUG && top_level
+ && DECL_CONTEXT (decl))
+ dwarf2out_file_scope_decl (decl, 0);
#endif
}
&& DECL_CONTEXT (decl))
dwarfout_file_scope_decl (decl, 0);
#endif
+#ifdef DWARF2_DEBUGGING_INFO
+ if (write_symbols == DWARF2_DEBUG && top_level
+ && DECL_CONTEXT (decl))
+ dwarf2out_file_scope_decl (decl, 0);
+#endif
/* Only output DWARF debugging information for record-scope variables
here. In the case of function-scope variables, the information