diff options
author | Cary Coutant <ccoutant@google.com> | 2009-06-04 23:12:27 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@gcc.gnu.org> | 2009-06-04 16:12:27 -0700 |
commit | 6c52e687e487eb5bfc57399754d72e05845159d8 (patch) | |
tree | 62b2a3883be83cd19685457df195f788da6d5d99 /gcc/dwarf2out.c | |
parent | 535ff342b76110501c8673df1ae44db5e6ea55b4 (diff) | |
download | gcc-6c52e687e487eb5bfc57399754d72e05845159d8.tar.gz |
basic-block.h (struct basic_block_def): Add discriminator field.
* basic-block.h (struct basic_block_def): Add discriminator field.
* dbxout.c (dbxout_source_line): Add new parameter. Change all
callers.
* debug.c (do_nothing_debug_hooks): Add additional entry.
(debug_nothing_int_charstar_int): New function.
* debug.h (struct gcc_debug_hooks): Add parameter to source_line
hook.
(debug_nothing_int_charstar_int): New declaration.
* dwarf2out.c (dwarf2out_source_line): Add new parameter. Write
discriminator value in .loc directive.
* final.c (last_discriminator): New variable.
(discriminator): New variable.
(final_start_function): Initialize above variables, pass current
discriminator to debug hook.
(notice_source_line): Check for discriminator change.
* gimple-pretty-print.c (dump_bb_header): Print discriminator value.
* sdbout.c (sdbout_source_line): New parameter.
* tree-cfg.c (struct locus_discrim_map): New structure type.
(discriminator_per_locus): New hash table.
(build_gimple_cfg): Allocate and free discriminator hash table.
(make_edges): Call assign_discriminator.
(locus_map_hash): New function.
(locus_map_eq): New function.
(next_discriminator_for_locus): New function.
(same_line_p): New function.
(assign_discriminator): New function.
(make_cond_expr_edges): Call assign_discriminator.
(make_gimple_switch_edges): Likewise.
(first_non_label_stmt): New function.
* vmsdbgout.c (vmsdbgout_source_line): Add new parameter. Change
all callers.
* xcoffout.c (xcoffout_source_line): Add new parameter.
* configure.ac (gcc_cv_as_discriminator): New configury check for
gas support for discriminator.
* configure: Regenerate.
* config.in: Regenerate.
From-SVN: r148191
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 63ec0a604da..21f2aed018d 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -91,7 +91,7 @@ along with GCC; see the file COPYING3. If not see #include "input.h" #ifdef DWARF2_DEBUGGING_INFO -static void dwarf2out_source_line (unsigned int, const char *); +static void dwarf2out_source_line (unsigned int, const char *, int); #endif #ifndef DWARF2_FRAME_INFO @@ -3608,7 +3608,7 @@ dwarf2out_begin_prologue (unsigned int line ATTRIBUTE_UNUSED, prologue case, not the eh frame case. */ #ifdef DWARF2_DEBUGGING_INFO if (file) - dwarf2out_source_line (line, file); + dwarf2out_source_line (line, file, 0); #endif if (dwarf2out_do_cfi_asm ()) @@ -16207,7 +16207,8 @@ dwarf2out_begin_function (tree fun) 'line_info_table' for later output of the .debug_line section. */ static void -dwarf2out_source_line (unsigned int line, const char *filename) +dwarf2out_source_line (unsigned int line, const char *filename, + int discriminator) { if (debug_info_level >= DINFO_LEVEL_NORMAL && line != 0) @@ -16224,7 +16225,12 @@ dwarf2out_source_line (unsigned int line, const char *filename) if (DWARF2_ASM_LINE_DEBUG_INFO) { /* Emit the .loc directive understood by GNU as. */ - fprintf (asm_out_file, "\t.loc %d %d 0\n", file_num, line); + fprintf (asm_out_file, "\t.loc %d %d 0", file_num, line); +#ifdef HAVE_GAS_DISCRIMINATOR + if (discriminator != 0) + fprintf (asm_out_file, " discriminator %d", discriminator); +#endif /* HAVE_GAS_DISCRIMINATOR */ + fputc ('\n', asm_out_file); /* Indicate that line number info exists. */ line_info_table_in_use++; |