final.c (last_columnnum, [...]): New variables.
* final.c (last_columnnum, override_columnnum): New variables. (final_start_function): Set last_columnnum, pass it to begin_prologue hook and pass 0 to dwarf2out_begin_prologue. (final_scan_insn): Update override_columnnum. Pass last_columnnum to source_line debug hook. (notice_source_line): Compute last_columnnum and for debug_column_info return true on column changes. * debug.h (struct gcc_debug_hooks): Add column argument to source_line and begin_prologue hooks. (debug_nothing_int_charstar_int_bool): Remove prototype. (debug_nothing_int_int_charstar, debug_nothing_int_int_charstar_int_bool): New prototypes. (dwarf2out_begin_prologue): Add column argument. * debug.c (do_nothing_debug_hooks): Adjust source_line and begin_prologue hooks. (debug_nothing_int_charstar_int_bool): Remove. (debug_nothing_int_int_charstar, debug_nothing_int_int_charstar_int_bool): New functions. * dwarf2out.c (dwarf2out_begin_prologue): Add column argument, pass it through to dwarf2out_source_line. (dwarf2_lineno_debug_hooks): Adjust begin_prologue hook. (dwarf2out_source_line): Add column argument, emit it if requested. * sdbout.c (sdbout_source_line, sdbout_begin_prologue): Add column arguments. * xcoffout.h (xcoffout_begin_prologue, xcoffout_source_line): Likewise. * xcoffout.c (xcoffout_begin_prologue, xcoffout_source_line): Likewise. * vmsdbgout.c (vmsdbgout_begin_prologue): Add column argument, pass it through to dwarf2out_begin_prologue. (vmsdbgout_source_line): Add column argument, pass it through to dwarf2out_source_line. * dbxout.c (dbxout_begin_prologue): Add column argument, adjust dbxout_source_line caller. (dbxout_source_line): Add column argument. From-SVN: r245564
This commit is contained in:
parent
0029b929c9
commit
497b7c4704
|
@ -1,5 +1,39 @@
|
||||||
2017-02-18 Jakub Jelinek <jakub@redhat.com>
|
2017-02-18 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* final.c (last_columnnum, override_columnnum): New variables.
|
||||||
|
(final_start_function): Set last_columnnum, pass it to begin_prologue
|
||||||
|
hook and pass 0 to dwarf2out_begin_prologue.
|
||||||
|
(final_scan_insn): Update override_columnnum. Pass last_columnnum
|
||||||
|
to source_line debug hook.
|
||||||
|
(notice_source_line): Compute last_columnnum and for debug_column_info
|
||||||
|
return true on column changes.
|
||||||
|
* debug.h (struct gcc_debug_hooks): Add column argument to
|
||||||
|
source_line and begin_prologue hooks.
|
||||||
|
(debug_nothing_int_charstar_int_bool): Remove prototype.
|
||||||
|
(debug_nothing_int_int_charstar,
|
||||||
|
debug_nothing_int_int_charstar_int_bool): New prototypes.
|
||||||
|
(dwarf2out_begin_prologue): Add column argument.
|
||||||
|
* debug.c (do_nothing_debug_hooks): Adjust source_line and
|
||||||
|
begin_prologue hooks.
|
||||||
|
(debug_nothing_int_charstar_int_bool): Remove.
|
||||||
|
(debug_nothing_int_int_charstar,
|
||||||
|
debug_nothing_int_int_charstar_int_bool): New functions.
|
||||||
|
* dwarf2out.c (dwarf2out_begin_prologue): Add column argument, pass it
|
||||||
|
through to dwarf2out_source_line.
|
||||||
|
(dwarf2_lineno_debug_hooks): Adjust begin_prologue hook.
|
||||||
|
(dwarf2out_source_line): Add column argument, emit it if requested.
|
||||||
|
* sdbout.c (sdbout_source_line, sdbout_begin_prologue): Add column
|
||||||
|
arguments.
|
||||||
|
* xcoffout.h (xcoffout_begin_prologue, xcoffout_source_line): Likewise.
|
||||||
|
* xcoffout.c (xcoffout_begin_prologue, xcoffout_source_line): Likewise.
|
||||||
|
* vmsdbgout.c (vmsdbgout_begin_prologue): Add column argument, pass it
|
||||||
|
through to dwarf2out_begin_prologue.
|
||||||
|
(vmsdbgout_source_line): Add column argument, pass it through to
|
||||||
|
dwarf2out_source_line.
|
||||||
|
* dbxout.c (dbxout_begin_prologue): Add column argument, adjust
|
||||||
|
dbxout_source_line caller.
|
||||||
|
(dbxout_source_line): Add column argument.
|
||||||
|
|
||||||
* common.opt (gno-column-info, gcolumn-info): New options.
|
* common.opt (gno-column-info, gcolumn-info): New options.
|
||||||
* dwarf2out.c (dwarf2_lineno_debug_hooks): Formatting fix.
|
* dwarf2out.c (dwarf2_lineno_debug_hooks): Formatting fix.
|
||||||
(check_die): Also test for multiple DW_AT_decl_column attributes.
|
(check_die): Also test for multiple DW_AT_decl_column attributes.
|
||||||
|
|
15
gcc/dbxout.c
15
gcc/dbxout.c
|
@ -332,8 +332,9 @@ static void debug_free_queue (void);
|
||||||
/* The debug hooks structure. */
|
/* The debug hooks structure. */
|
||||||
#if defined (DBX_DEBUGGING_INFO)
|
#if defined (DBX_DEBUGGING_INFO)
|
||||||
|
|
||||||
static void dbxout_source_line (unsigned int, const char *, int, bool);
|
static void dbxout_source_line (unsigned int, unsigned int, const char *,
|
||||||
static void dbxout_begin_prologue (unsigned int, const char *);
|
int, bool);
|
||||||
|
static void dbxout_begin_prologue (unsigned int, unsigned int, const char *);
|
||||||
static void dbxout_source_file (const char *);
|
static void dbxout_source_file (const char *);
|
||||||
static void dbxout_function_end (tree);
|
static void dbxout_function_end (tree);
|
||||||
static void dbxout_begin_function (tree);
|
static void dbxout_begin_function (tree);
|
||||||
|
@ -1241,7 +1242,9 @@ dbxout_source_file (const char *filename)
|
||||||
function scope */
|
function scope */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dbxout_begin_prologue (unsigned int lineno, const char *filename)
|
dbxout_begin_prologue (unsigned int lineno,
|
||||||
|
unsigned int column ATTRIBUTE_UNUSED,
|
||||||
|
const char *filename)
|
||||||
{
|
{
|
||||||
if (use_gnu_debug_info_extensions
|
if (use_gnu_debug_info_extensions
|
||||||
&& !NO_DBX_FUNCTION_END
|
&& !NO_DBX_FUNCTION_END
|
||||||
|
@ -1252,7 +1255,7 @@ dbxout_begin_prologue (unsigned int lineno, const char *filename)
|
||||||
/* pre-increment the scope counter */
|
/* pre-increment the scope counter */
|
||||||
scope_labelno++;
|
scope_labelno++;
|
||||||
|
|
||||||
dbxout_source_line (lineno, filename, 0, true);
|
dbxout_source_line (lineno, 0, filename, 0, true);
|
||||||
/* Output function begin block at function scope, referenced
|
/* Output function begin block at function scope, referenced
|
||||||
by dbxout_block, dbxout_source_line and dbxout_function_end. */
|
by dbxout_block, dbxout_source_line and dbxout_function_end. */
|
||||||
emit_pending_bincls_if_required ();
|
emit_pending_bincls_if_required ();
|
||||||
|
@ -1263,8 +1266,8 @@ dbxout_begin_prologue (unsigned int lineno, const char *filename)
|
||||||
number LINENO. */
|
number LINENO. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dbxout_source_line (unsigned int lineno, const char *filename,
|
dbxout_source_line (unsigned int lineno, unsigned int column ATTRIBUTE_UNUSED,
|
||||||
int discriminator ATTRIBUTE_UNUSED,
|
const char *filename, int discriminator ATTRIBUTE_UNUSED,
|
||||||
bool is_stmt ATTRIBUTE_UNUSED)
|
bool is_stmt ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
dbxout_source_file (filename);
|
dbxout_source_file (filename);
|
||||||
|
|
20
gcc/debug.c
20
gcc/debug.c
|
@ -35,8 +35,8 @@ const struct gcc_debug_hooks do_nothing_debug_hooks =
|
||||||
debug_nothing_int_int, /* begin_block */
|
debug_nothing_int_int, /* begin_block */
|
||||||
debug_nothing_int_int, /* end_block */
|
debug_nothing_int_int, /* end_block */
|
||||||
debug_true_const_tree, /* ignore_block */
|
debug_true_const_tree, /* ignore_block */
|
||||||
debug_nothing_int_charstar_int_bool, /* source_line */
|
debug_nothing_int_int_charstar_int_bool, /* source_line */
|
||||||
debug_nothing_int_charstar, /* begin_prologue */
|
debug_nothing_int_int_charstar, /* begin_prologue */
|
||||||
debug_nothing_int_charstar, /* end_prologue */
|
debug_nothing_int_charstar, /* end_prologue */
|
||||||
debug_nothing_int_charstar, /* begin_epilogue */
|
debug_nothing_int_charstar, /* begin_epilogue */
|
||||||
debug_nothing_int_charstar, /* end_epilogue */
|
debug_nothing_int_charstar, /* end_epilogue */
|
||||||
|
@ -115,10 +115,18 @@ debug_nothing_int_charstar (unsigned int line ATTRIBUTE_UNUSED,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
debug_nothing_int_charstar_int_bool (unsigned int line ATTRIBUTE_UNUSED,
|
debug_nothing_int_int_charstar (unsigned int line ATTRIBUTE_UNUSED,
|
||||||
const char *text ATTRIBUTE_UNUSED,
|
unsigned int column ATTRIBUTE_UNUSED,
|
||||||
int discriminator ATTRIBUTE_UNUSED,
|
const char *text ATTRIBUTE_UNUSED)
|
||||||
bool is_stmt ATTRIBUTE_UNUSED)
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
debug_nothing_int_int_charstar_int_bool (unsigned int line ATTRIBUTE_UNUSED,
|
||||||
|
unsigned int column ATTRIBUTE_UNUSED,
|
||||||
|
const char *text ATTRIBUTE_UNUSED,
|
||||||
|
int discriminator ATTRIBUTE_UNUSED,
|
||||||
|
bool is_stmt ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
20
gcc/debug.h
20
gcc/debug.h
|
@ -65,13 +65,14 @@ struct gcc_debug_hooks
|
||||||
though the BLOCK information is messed up. Defaults to true. */
|
though the BLOCK information is messed up. Defaults to true. */
|
||||||
bool (* ignore_block) (const_tree);
|
bool (* ignore_block) (const_tree);
|
||||||
|
|
||||||
/* Record a source file location at (FILE, LINE, DISCRIMINATOR). */
|
/* Record a source file location at (FILE, LINE, COLUMN, DISCRIMINATOR). */
|
||||||
void (* source_line) (unsigned int line, const char *file,
|
void (* source_line) (unsigned int line, unsigned int column,
|
||||||
int discriminator, bool is_stmt);
|
const char *file, int discriminator, bool is_stmt);
|
||||||
|
|
||||||
/* Called at start of prologue code. LINE is the first line in the
|
/* Called at start of prologue code. LINE is the first line in the
|
||||||
function. */
|
function. */
|
||||||
void (* begin_prologue) (unsigned int line, const char *file);
|
void (* begin_prologue) (unsigned int line, unsigned int column,
|
||||||
|
const char *file);
|
||||||
|
|
||||||
/* Called at end of prologue code. LINE is the first line in the
|
/* Called at end of prologue code. LINE is the first line in the
|
||||||
function. */
|
function. */
|
||||||
|
@ -193,9 +194,13 @@ extern const struct gcc_debug_hooks *debug_hooks;
|
||||||
/* The do-nothing hooks. */
|
/* The do-nothing hooks. */
|
||||||
extern void debug_nothing_void (void);
|
extern void debug_nothing_void (void);
|
||||||
extern void debug_nothing_charstar (const char *);
|
extern void debug_nothing_charstar (const char *);
|
||||||
|
extern void debug_nothing_int_int_charstar (unsigned int, unsigned int,
|
||||||
|
const char *);
|
||||||
extern void debug_nothing_int_charstar (unsigned int, const char *);
|
extern void debug_nothing_int_charstar (unsigned int, const char *);
|
||||||
extern void debug_nothing_int_charstar_int_bool (unsigned int, const char *,
|
extern void debug_nothing_int_int_charstar_int_bool (unsigned int,
|
||||||
int, bool);
|
unsigned int,
|
||||||
|
const char *,
|
||||||
|
int, bool);
|
||||||
extern void debug_nothing_int (unsigned int);
|
extern void debug_nothing_int (unsigned int);
|
||||||
extern void debug_nothing_int_int (unsigned int, unsigned int);
|
extern void debug_nothing_int_int (unsigned int, unsigned int);
|
||||||
extern void debug_nothing_tree (tree);
|
extern void debug_nothing_tree (tree);
|
||||||
|
@ -217,7 +222,8 @@ extern const struct gcc_debug_hooks vmsdbg_debug_hooks;
|
||||||
|
|
||||||
/* Dwarf2 frame information. */
|
/* Dwarf2 frame information. */
|
||||||
|
|
||||||
extern void dwarf2out_begin_prologue (unsigned int, const char *);
|
extern void dwarf2out_begin_prologue (unsigned int, unsigned int,
|
||||||
|
const char *);
|
||||||
extern void dwarf2out_vms_end_prologue (unsigned int, const char *);
|
extern void dwarf2out_vms_end_prologue (unsigned int, const char *);
|
||||||
extern void dwarf2out_vms_begin_epilogue (unsigned int, const char *);
|
extern void dwarf2out_vms_begin_epilogue (unsigned int, const char *);
|
||||||
extern void dwarf2out_end_epilogue (unsigned int, const char *);
|
extern void dwarf2out_end_epilogue (unsigned int, const char *);
|
||||||
|
|
|
@ -93,7 +93,8 @@ along with GCC; see the file COPYING3. If not see
|
||||||
#include "gdb/gdb-index.h"
|
#include "gdb/gdb-index.h"
|
||||||
#include "rtl-iter.h"
|
#include "rtl-iter.h"
|
||||||
|
|
||||||
static void dwarf2out_source_line (unsigned int, const char *, int, bool);
|
static void dwarf2out_source_line (unsigned int, unsigned int, const char *,
|
||||||
|
int, bool);
|
||||||
static rtx_insn *last_var_location_insn;
|
static rtx_insn *last_var_location_insn;
|
||||||
static rtx_insn *cached_next_real_insn;
|
static rtx_insn *cached_next_real_insn;
|
||||||
static void dwarf2out_decl (tree);
|
static void dwarf2out_decl (tree);
|
||||||
|
@ -1023,6 +1024,7 @@ dwarf2out_alloc_current_fde (void)
|
||||||
|
|
||||||
void
|
void
|
||||||
dwarf2out_begin_prologue (unsigned int line ATTRIBUTE_UNUSED,
|
dwarf2out_begin_prologue (unsigned int line ATTRIBUTE_UNUSED,
|
||||||
|
unsigned int column ATTRIBUTE_UNUSED,
|
||||||
const char *file ATTRIBUTE_UNUSED)
|
const char *file ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
char label[MAX_ARTIFICIAL_LABEL_BYTES];
|
char label[MAX_ARTIFICIAL_LABEL_BYTES];
|
||||||
|
@ -1073,7 +1075,7 @@ dwarf2out_begin_prologue (unsigned int line ATTRIBUTE_UNUSED,
|
||||||
prologue case, not the eh frame case. */
|
prologue case, not the eh frame case. */
|
||||||
#ifdef DWARF2_DEBUGGING_INFO
|
#ifdef DWARF2_DEBUGGING_INFO
|
||||||
if (file)
|
if (file)
|
||||||
dwarf2out_source_line (line, file, 0, true);
|
dwarf2out_source_line (line, column, file, 0, true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (dwarf2out_do_cfi_asm ())
|
if (dwarf2out_do_cfi_asm ())
|
||||||
|
@ -1099,7 +1101,7 @@ dwarf2out_begin_prologue (unsigned int line ATTRIBUTE_UNUSED,
|
||||||
|
|
||||||
void
|
void
|
||||||
dwarf2out_vms_end_prologue (unsigned int line ATTRIBUTE_UNUSED,
|
dwarf2out_vms_end_prologue (unsigned int line ATTRIBUTE_UNUSED,
|
||||||
const char *file ATTRIBUTE_UNUSED)
|
const char *file ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
char label[MAX_ARTIFICIAL_LABEL_BYTES];
|
char label[MAX_ARTIFICIAL_LABEL_BYTES];
|
||||||
|
|
||||||
|
@ -2733,7 +2735,7 @@ const struct gcc_debug_hooks dwarf2_lineno_debug_hooks =
|
||||||
debug_nothing_int_int, /* end_block */
|
debug_nothing_int_int, /* end_block */
|
||||||
debug_true_const_tree, /* ignore_block */
|
debug_true_const_tree, /* ignore_block */
|
||||||
dwarf2out_source_line, /* source_line */
|
dwarf2out_source_line, /* source_line */
|
||||||
debug_nothing_int_charstar, /* begin_prologue */
|
debug_nothing_int_int_charstar, /* begin_prologue */
|
||||||
debug_nothing_int_charstar, /* end_prologue */
|
debug_nothing_int_charstar, /* end_prologue */
|
||||||
debug_nothing_int_charstar, /* begin_epilogue */
|
debug_nothing_int_charstar, /* begin_epilogue */
|
||||||
debug_nothing_int_charstar, /* end_epilogue */
|
debug_nothing_int_charstar, /* end_epilogue */
|
||||||
|
@ -26534,7 +26536,8 @@ push_dw_line_info_entry (dw_line_info_table *table,
|
||||||
/* ??? The discriminator parameter ought to be unsigned. */
|
/* ??? The discriminator parameter ought to be unsigned. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dwarf2out_source_line (unsigned int line, const char *filename,
|
dwarf2out_source_line (unsigned int line, unsigned int column,
|
||||||
|
const char *filename,
|
||||||
int discriminator, bool is_stmt)
|
int discriminator, bool is_stmt)
|
||||||
{
|
{
|
||||||
unsigned int file_num;
|
unsigned int file_num;
|
||||||
|
@ -26548,6 +26551,9 @@ dwarf2out_source_line (unsigned int line, const char *filename,
|
||||||
if (dwarf_version < 4 && dwarf_strict)
|
if (dwarf_version < 4 && dwarf_strict)
|
||||||
discriminator = 0;
|
discriminator = 0;
|
||||||
|
|
||||||
|
if (!debug_column_info)
|
||||||
|
column = 0;
|
||||||
|
|
||||||
table = cur_line_info_table;
|
table = cur_line_info_table;
|
||||||
file_num = maybe_emit_file (lookup_filename (filename));
|
file_num = maybe_emit_file (lookup_filename (filename));
|
||||||
|
|
||||||
|
@ -26567,6 +26573,7 @@ dwarf2out_source_line (unsigned int line, const char *filename,
|
||||||
|
|
||||||
if (0 && file_num == table->file_num
|
if (0 && file_num == table->file_num
|
||||||
&& line == table->line_num
|
&& line == table->line_num
|
||||||
|
&& column == table->column_num
|
||||||
&& discriminator == table->discrim_num
|
&& discriminator == table->discrim_num
|
||||||
&& is_stmt == table->is_stmt)
|
&& is_stmt == table->is_stmt)
|
||||||
return;
|
return;
|
||||||
|
@ -26575,7 +26582,14 @@ dwarf2out_source_line (unsigned int line, const char *filename,
|
||||||
|
|
||||||
/* If requested, emit something human-readable. */
|
/* If requested, emit something human-readable. */
|
||||||
if (flag_debug_asm)
|
if (flag_debug_asm)
|
||||||
fprintf (asm_out_file, "\t%s %s:%d\n", ASM_COMMENT_START, filename, line);
|
{
|
||||||
|
if (debug_column_info)
|
||||||
|
fprintf (asm_out_file, "\t%s %s:%d:%d\n", ASM_COMMENT_START,
|
||||||
|
filename, line, column);
|
||||||
|
else
|
||||||
|
fprintf (asm_out_file, "\t%s %s:%d\n", ASM_COMMENT_START,
|
||||||
|
filename, line);
|
||||||
|
}
|
||||||
|
|
||||||
if (DWARF2_ASM_LINE_DEBUG_INFO)
|
if (DWARF2_ASM_LINE_DEBUG_INFO)
|
||||||
{
|
{
|
||||||
|
@ -26587,7 +26601,10 @@ dwarf2out_source_line (unsigned int line, const char *filename,
|
||||||
putc (' ', asm_out_file);
|
putc (' ', asm_out_file);
|
||||||
fprint_ul (asm_out_file, line);
|
fprint_ul (asm_out_file, line);
|
||||||
putc (' ', asm_out_file);
|
putc (' ', asm_out_file);
|
||||||
putc ('0', asm_out_file);
|
if (debug_column_info)
|
||||||
|
fprint_ul (asm_out_file, column);
|
||||||
|
else
|
||||||
|
putc ('0', asm_out_file);
|
||||||
|
|
||||||
if (is_stmt != table->is_stmt)
|
if (is_stmt != table->is_stmt)
|
||||||
{
|
{
|
||||||
|
@ -26616,10 +26633,13 @@ dwarf2out_source_line (unsigned int line, const char *filename,
|
||||||
if (is_stmt != table->is_stmt)
|
if (is_stmt != table->is_stmt)
|
||||||
push_dw_line_info_entry (table, LI_negate_stmt, 0);
|
push_dw_line_info_entry (table, LI_negate_stmt, 0);
|
||||||
push_dw_line_info_entry (table, LI_set_line, line);
|
push_dw_line_info_entry (table, LI_set_line, line);
|
||||||
|
if (debug_column_info)
|
||||||
|
push_dw_line_info_entry (table, LI_set_column, column);
|
||||||
}
|
}
|
||||||
|
|
||||||
table->file_num = file_num;
|
table->file_num = file_num;
|
||||||
table->line_num = line;
|
table->line_num = line;
|
||||||
|
table->column_num = column;
|
||||||
table->discrim_num = discriminator;
|
table->discrim_num = discriminator;
|
||||||
table->is_stmt = is_stmt;
|
table->is_stmt = is_stmt;
|
||||||
table->in_use = true;
|
table->in_use = true;
|
||||||
|
|
28
gcc/final.c
28
gcc/final.c
|
@ -118,6 +118,9 @@ rtx_insn *current_output_insn;
|
||||||
/* Line number of last NOTE. */
|
/* Line number of last NOTE. */
|
||||||
static int last_linenum;
|
static int last_linenum;
|
||||||
|
|
||||||
|
/* Column number of last NOTE. */
|
||||||
|
static int last_columnnum;
|
||||||
|
|
||||||
/* Last discriminator written to assembly. */
|
/* Last discriminator written to assembly. */
|
||||||
static int last_discriminator;
|
static int last_discriminator;
|
||||||
|
|
||||||
|
@ -133,9 +136,10 @@ static int high_function_linenum;
|
||||||
/* Filename of last NOTE. */
|
/* Filename of last NOTE. */
|
||||||
static const char *last_filename;
|
static const char *last_filename;
|
||||||
|
|
||||||
/* Override filename and line number. */
|
/* Override filename, line and column number. */
|
||||||
static const char *override_filename;
|
static const char *override_filename;
|
||||||
static int override_linenum;
|
static int override_linenum;
|
||||||
|
static int override_columnnum;
|
||||||
|
|
||||||
/* Whether to force emission of a line note before the next insn. */
|
/* Whether to force emission of a line note before the next insn. */
|
||||||
static bool force_source_line = false;
|
static bool force_source_line = false;
|
||||||
|
@ -1763,6 +1767,7 @@ final_start_function (rtx_insn *first, FILE *file,
|
||||||
|
|
||||||
last_filename = LOCATION_FILE (prologue_location);
|
last_filename = LOCATION_FILE (prologue_location);
|
||||||
last_linenum = LOCATION_LINE (prologue_location);
|
last_linenum = LOCATION_LINE (prologue_location);
|
||||||
|
last_columnnum = LOCATION_COLUMN (prologue_location);
|
||||||
last_discriminator = discriminator = 0;
|
last_discriminator = discriminator = 0;
|
||||||
|
|
||||||
high_block_linenum = high_function_linenum = last_linenum;
|
high_block_linenum = high_function_linenum = last_linenum;
|
||||||
|
@ -1771,10 +1776,10 @@ final_start_function (rtx_insn *first, FILE *file,
|
||||||
asan_function_start ();
|
asan_function_start ();
|
||||||
|
|
||||||
if (!DECL_IGNORED_P (current_function_decl))
|
if (!DECL_IGNORED_P (current_function_decl))
|
||||||
debug_hooks->begin_prologue (last_linenum, last_filename);
|
debug_hooks->begin_prologue (last_linenum, last_columnnum, last_filename);
|
||||||
|
|
||||||
if (!dwarf2_debug_info_emitted_p (current_function_decl))
|
if (!dwarf2_debug_info_emitted_p (current_function_decl))
|
||||||
dwarf2out_begin_prologue (0, NULL);
|
dwarf2out_begin_prologue (0, 0, NULL);
|
||||||
|
|
||||||
#ifdef LEAF_REG_REMAP
|
#ifdef LEAF_REG_REMAP
|
||||||
if (crtl->uses_only_leaf_regs)
|
if (crtl->uses_only_leaf_regs)
|
||||||
|
@ -2335,6 +2340,7 @@ final_scan_insn (rtx_insn *insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED,
|
||||||
{
|
{
|
||||||
override_filename = LOCATION_FILE (*locus_ptr);
|
override_filename = LOCATION_FILE (*locus_ptr);
|
||||||
override_linenum = LOCATION_LINE (*locus_ptr);
|
override_linenum = LOCATION_LINE (*locus_ptr);
|
||||||
|
override_columnnum = LOCATION_COLUMN (*locus_ptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2370,11 +2376,13 @@ final_scan_insn (rtx_insn *insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED,
|
||||||
{
|
{
|
||||||
override_filename = LOCATION_FILE (*locus_ptr);
|
override_filename = LOCATION_FILE (*locus_ptr);
|
||||||
override_linenum = LOCATION_LINE (*locus_ptr);
|
override_linenum = LOCATION_LINE (*locus_ptr);
|
||||||
|
override_columnnum = LOCATION_COLUMN (*locus_ptr);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
override_filename = NULL;
|
override_filename = NULL;
|
||||||
override_linenum = 0;
|
override_linenum = 0;
|
||||||
|
override_columnnum = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2592,8 +2600,9 @@ final_scan_insn (rtx_insn *insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED,
|
||||||
{
|
{
|
||||||
if (flag_verbose_asm)
|
if (flag_verbose_asm)
|
||||||
asm_show_source (last_filename, last_linenum);
|
asm_show_source (last_filename, last_linenum);
|
||||||
(*debug_hooks->source_line) (last_linenum, last_filename,
|
(*debug_hooks->source_line) (last_linenum, last_columnnum,
|
||||||
last_discriminator, is_stmt);
|
last_filename, last_discriminator,
|
||||||
|
is_stmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GET_CODE (body) == PARALLEL
|
if (GET_CODE (body) == PARALLEL
|
||||||
|
@ -3078,23 +3087,26 @@ static bool
|
||||||
notice_source_line (rtx_insn *insn, bool *is_stmt)
|
notice_source_line (rtx_insn *insn, bool *is_stmt)
|
||||||
{
|
{
|
||||||
const char *filename;
|
const char *filename;
|
||||||
int linenum;
|
int linenum, columnnum;
|
||||||
|
|
||||||
if (override_filename)
|
if (override_filename)
|
||||||
{
|
{
|
||||||
filename = override_filename;
|
filename = override_filename;
|
||||||
linenum = override_linenum;
|
linenum = override_linenum;
|
||||||
|
columnnum = override_columnnum;
|
||||||
}
|
}
|
||||||
else if (INSN_HAS_LOCATION (insn))
|
else if (INSN_HAS_LOCATION (insn))
|
||||||
{
|
{
|
||||||
expanded_location xloc = insn_location (insn);
|
expanded_location xloc = insn_location (insn);
|
||||||
filename = xloc.file;
|
filename = xloc.file;
|
||||||
linenum = xloc.line;
|
linenum = xloc.line;
|
||||||
|
columnnum = xloc.column;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
filename = NULL;
|
filename = NULL;
|
||||||
linenum = 0;
|
linenum = 0;
|
||||||
|
columnnum = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filename == NULL)
|
if (filename == NULL)
|
||||||
|
@ -3102,11 +3114,13 @@ notice_source_line (rtx_insn *insn, bool *is_stmt)
|
||||||
|
|
||||||
if (force_source_line
|
if (force_source_line
|
||||||
|| filename != last_filename
|
|| filename != last_filename
|
||||||
|| last_linenum != linenum)
|
|| last_linenum != linenum
|
||||||
|
|| (debug_column_info && last_columnnum != columnnum))
|
||||||
{
|
{
|
||||||
force_source_line = false;
|
force_source_line = false;
|
||||||
last_filename = filename;
|
last_filename = filename;
|
||||||
last_linenum = linenum;
|
last_linenum = linenum;
|
||||||
|
last_columnnum = columnnum;
|
||||||
last_discriminator = discriminator;
|
last_discriminator = discriminator;
|
||||||
*is_stmt = true;
|
*is_stmt = true;
|
||||||
high_block_linenum = MAX (last_linenum, high_block_linenum);
|
high_block_linenum = MAX (last_linenum, high_block_linenum);
|
||||||
|
|
12
gcc/sdbout.c
12
gcc/sdbout.c
|
@ -116,11 +116,13 @@ static void sdbout_start_source_file (unsigned int, const char *);
|
||||||
static void sdbout_end_source_file (unsigned int);
|
static void sdbout_end_source_file (unsigned int);
|
||||||
static void sdbout_begin_block (unsigned int, unsigned int);
|
static void sdbout_begin_block (unsigned int, unsigned int);
|
||||||
static void sdbout_end_block (unsigned int, unsigned int);
|
static void sdbout_end_block (unsigned int, unsigned int);
|
||||||
static void sdbout_source_line (unsigned int, const char *, int, bool);
|
static void sdbout_source_line (unsigned int, unsigned int,
|
||||||
|
const char *, int, bool);
|
||||||
static void sdbout_end_epilogue (unsigned int, const char *);
|
static void sdbout_end_epilogue (unsigned int, const char *);
|
||||||
static void sdbout_early_global_decl (tree);
|
static void sdbout_early_global_decl (tree);
|
||||||
static void sdbout_late_global_decl (tree);
|
static void sdbout_late_global_decl (tree);
|
||||||
static void sdbout_begin_prologue (unsigned int, const char *);
|
static void sdbout_begin_prologue (unsigned int, unsigned int,
|
||||||
|
const char *);
|
||||||
static void sdbout_end_prologue (unsigned int, const char *);
|
static void sdbout_end_prologue (unsigned int, const char *);
|
||||||
static void sdbout_begin_function (tree);
|
static void sdbout_begin_function (tree);
|
||||||
static void sdbout_end_function (unsigned int);
|
static void sdbout_end_function (unsigned int);
|
||||||
|
@ -1519,7 +1521,8 @@ sdbout_end_block (unsigned int line, unsigned int n ATTRIBUTE_UNUSED)
|
||||||
number LINE. */
|
number LINE. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sdbout_source_line (unsigned int line, const char *filename ATTRIBUTE_UNUSED,
|
sdbout_source_line (unsigned int line, unsigned int column ATTRIBUTE_UNUSED,
|
||||||
|
const char *filename ATTRIBUTE_UNUSED,
|
||||||
int discriminator ATTRIBUTE_UNUSED,
|
int discriminator ATTRIBUTE_UNUSED,
|
||||||
bool is_stmt ATTRIBUTE_UNUSED)
|
bool is_stmt ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
|
@ -1551,7 +1554,8 @@ sdbout_begin_function (tree decl ATTRIBUTE_UNUSED)
|
||||||
describe the parameter list. */
|
describe the parameter list. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sdbout_begin_prologue (unsigned int line, const char *file ATTRIBUTE_UNUSED)
|
sdbout_begin_prologue (unsigned int line, unsigned int column ATTRIBUTE_UNUSED,
|
||||||
|
const char *file ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
sdbout_end_prologue (line, file);
|
sdbout_end_prologue (line, file);
|
||||||
}
|
}
|
||||||
|
|
|
@ -155,9 +155,11 @@ static void vmsdbgout_end_source_file (unsigned int);
|
||||||
static void vmsdbgout_begin_block (unsigned int, unsigned int);
|
static void vmsdbgout_begin_block (unsigned int, unsigned int);
|
||||||
static void vmsdbgout_end_block (unsigned int, unsigned int);
|
static void vmsdbgout_end_block (unsigned int, unsigned int);
|
||||||
static bool vmsdbgout_ignore_block (const_tree);
|
static bool vmsdbgout_ignore_block (const_tree);
|
||||||
static void vmsdbgout_source_line (unsigned int, const char *, int, bool);
|
static void vmsdbgout_source_line (unsigned int, unsigned int, const char *,
|
||||||
|
int, bool);
|
||||||
static void vmsdbgout_write_source_line (unsigned, const char *, int , bool);
|
static void vmsdbgout_write_source_line (unsigned, const char *, int , bool);
|
||||||
static void vmsdbgout_begin_prologue (unsigned int, const char *);
|
static void vmsdbgout_begin_prologue (unsigned int, unsigned int,
|
||||||
|
const char *);
|
||||||
static void vmsdbgout_end_prologue (unsigned int, const char *);
|
static void vmsdbgout_end_prologue (unsigned int, const char *);
|
||||||
static void vmsdbgout_end_function (unsigned int);
|
static void vmsdbgout_end_function (unsigned int);
|
||||||
static void vmsdbgout_begin_epilogue (unsigned int, const char *);
|
static void vmsdbgout_begin_epilogue (unsigned int, const char *);
|
||||||
|
@ -1114,12 +1116,13 @@ write_srccorrs (int dosizeonly)
|
||||||
the prologue. */
|
the prologue. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
vmsdbgout_begin_prologue (unsigned int line, const char *file)
|
vmsdbgout_begin_prologue (unsigned int line, unsigned int column,
|
||||||
|
const char *file)
|
||||||
{
|
{
|
||||||
char label[MAX_ARTIFICIAL_LABEL_BYTES];
|
char label[MAX_ARTIFICIAL_LABEL_BYTES];
|
||||||
|
|
||||||
if (write_symbols == VMS_AND_DWARF2_DEBUG)
|
if (write_symbols == VMS_AND_DWARF2_DEBUG)
|
||||||
(*dwarf2_debug_hooks.begin_prologue) (line, file);
|
(*dwarf2_debug_hooks.begin_prologue) (line, column, file);
|
||||||
|
|
||||||
if (debug_info_level > DINFO_LEVEL_NONE)
|
if (debug_info_level > DINFO_LEVEL_NONE)
|
||||||
{
|
{
|
||||||
|
@ -1397,11 +1400,13 @@ vmsdbgout_write_source_line (unsigned line, const char *filename,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
vmsdbgout_source_line (register unsigned line, register const char *filename,
|
vmsdbgout_source_line (register unsigned line, unsigned int column,
|
||||||
|
register const char *filename,
|
||||||
int discriminator, bool is_stmt)
|
int discriminator, bool is_stmt)
|
||||||
{
|
{
|
||||||
if (write_symbols == VMS_AND_DWARF2_DEBUG)
|
if (write_symbols == VMS_AND_DWARF2_DEBUG)
|
||||||
(*dwarf2_debug_hooks.source_line) (line, filename, discriminator, is_stmt);
|
(*dwarf2_debug_hooks.source_line) (line, column, filename, discriminator,
|
||||||
|
is_stmt);
|
||||||
|
|
||||||
if (debug_info_level >= DINFO_LEVEL_TERSE)
|
if (debug_info_level >= DINFO_LEVEL_TERSE)
|
||||||
vmsdbgout_write_source_line (line, filename, discriminator, is_stmt);
|
vmsdbgout_write_source_line (line, filename, discriminator, is_stmt);
|
||||||
|
|
|
@ -327,8 +327,8 @@ xcoffout_source_file (FILE *file, const char *filename, int inline_p)
|
||||||
/* Output a line number symbol entry for location (FILENAME, LINE). */
|
/* Output a line number symbol entry for location (FILENAME, LINE). */
|
||||||
|
|
||||||
void
|
void
|
||||||
xcoffout_source_line (unsigned int line, const char *filename,
|
xcoffout_source_line (unsigned int line, unsigned int column ATTRIBUTE_UNUSED,
|
||||||
int discriminator ATTRIBUTE_UNUSED,
|
const char *filename, int discriminator ATTRIBUTE_UNUSED,
|
||||||
bool is_stmt ATTRIBUTE_UNUSED)
|
bool is_stmt ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
bool inline_p = (strcmp (xcoff_current_function_file, filename) != 0
|
bool inline_p = (strcmp (xcoff_current_function_file, filename) != 0
|
||||||
|
@ -446,6 +446,7 @@ xcoffout_declare_function (FILE *file, tree decl, const char *name)
|
||||||
|
|
||||||
void
|
void
|
||||||
xcoffout_begin_prologue (unsigned int line,
|
xcoffout_begin_prologue (unsigned int line,
|
||||||
|
unsigned int column ATTRIBUTE_UNUSED,
|
||||||
const char *file ATTRIBUTE_UNUSED)
|
const char *file ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
ASM_OUTPUT_LFB (asm_out_file, line);
|
ASM_OUTPUT_LFB (asm_out_file, line);
|
||||||
|
|
|
@ -181,13 +181,14 @@ do { \
|
||||||
/* Prototype functions in xcoffout.c. */
|
/* Prototype functions in xcoffout.c. */
|
||||||
|
|
||||||
extern int stab_to_sclass (int);
|
extern int stab_to_sclass (int);
|
||||||
extern void xcoffout_begin_prologue (unsigned int, const char *);
|
extern void xcoffout_begin_prologue (unsigned int, unsigned int, const char *);
|
||||||
extern void xcoffout_begin_block (unsigned, unsigned);
|
extern void xcoffout_begin_block (unsigned, unsigned);
|
||||||
extern void xcoffout_end_epilogue (unsigned int, const char *);
|
extern void xcoffout_end_epilogue (unsigned int, const char *);
|
||||||
extern void xcoffout_end_function (unsigned int);
|
extern void xcoffout_end_function (unsigned int);
|
||||||
extern void xcoffout_end_block (unsigned, unsigned);
|
extern void xcoffout_end_block (unsigned, unsigned);
|
||||||
extern int xcoff_assign_fundamental_type_number (tree);
|
extern int xcoff_assign_fundamental_type_number (tree);
|
||||||
extern void xcoffout_declare_function (FILE *, tree, const char *);
|
extern void xcoffout_declare_function (FILE *, tree, const char *);
|
||||||
extern void xcoffout_source_line (unsigned int, const char *, int, bool);
|
extern void xcoffout_source_line (unsigned int, unsigned int, const char *,
|
||||||
|
int, bool);
|
||||||
|
|
||||||
#endif /* GCC_XCOFFOUT_H */
|
#endif /* GCC_XCOFFOUT_H */
|
||||||
|
|
Loading…
Reference in New Issue