aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2011-12-13 13:30:18 +0000
committerTristan Gingold <gingold@gcc.gnu.org>2011-12-13 13:30:18 +0000
commite8a8ce6929fb2df8cda8797ea048afd49cb504a7 (patch)
tree39e1220fd00d288a45abc5467fee27309840d0ea /gcc
parent4642ed295275670cf0c321513b136b405d1098b7 (diff)
downloadgcc-e8a8ce6929fb2df8cda8797ea048afd49cb504a7.zip
gcc-e8a8ce6929fb2df8cda8797ea048afd49cb504a7.tar.gz
gcc-e8a8ce6929fb2df8cda8797ea048afd49cb504a7.tar.bz2
vmsdbgout.c (vmsdbgout_write_source_line): New function.
2011-12-13 Tristan Gingold <gingold@adacore.com> * vmsdbgout.c (vmsdbgout_write_source_line): New function. (vmsdbgout_end_prologue): Call vmsdbgout_write_source_line. (vmsdbgout_begin_epilogue): Likewise. (vmsdbgout_end_epilogue): Likewise. (vmsdbgout_source_line): Move code to vmsdbgout_write_source_line. From-SVN: r182281
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/vmsdbgout.c54
2 files changed, 38 insertions, 24 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a0e3707..63b7eac 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2011-12-13 Tristan Gingold <gingold@adacore.com>
+
+ * vmsdbgout.c (vmsdbgout_write_source_line): New function.
+ (vmsdbgout_end_prologue): Call vmsdbgout_write_source_line.
+ (vmsdbgout_begin_epilogue): Likewise.
+ (vmsdbgout_end_epilogue): Likewise.
+ (vmsdbgout_source_line): Move code to vmsdbgout_write_source_line.
+
2011-12-13 Richard Guenther <rguenther@suse.de>
PR middle-end/51481
diff --git a/gcc/vmsdbgout.c b/gcc/vmsdbgout.c
index 84a96c0..9689653 100644
--- a/gcc/vmsdbgout.c
+++ b/gcc/vmsdbgout.c
@@ -158,6 +158,7 @@ static void vmsdbgout_begin_block (unsigned int, unsigned int);
static void vmsdbgout_end_block (unsigned int, unsigned int);
static bool vmsdbgout_ignore_block (const_tree);
static void vmsdbgout_source_line (unsigned int, 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_end_prologue (unsigned int, const char *);
static void vmsdbgout_end_function (unsigned int);
@@ -1162,7 +1163,7 @@ vmsdbgout_end_prologue (unsigned int line, const char *file)
ASM_OUTPUT_LABEL (asm_out_file, label);
/* VMS PCA expects every PC range to correlate to some line and file. */
- vmsdbgout_source_line (line, file, 0, true);
+ vmsdbgout_write_source_line (line, file, 0, true);
}
}
@@ -1202,7 +1203,7 @@ vmsdbgout_begin_epilogue (unsigned int line, const char *file)
/* VMS PCA expects every PC range to correlate to some line and
file. */
- vmsdbgout_source_line (line, file, 0, true);
+ vmsdbgout_write_source_line (line, file, 0, true);
}
}
}
@@ -1228,7 +1229,7 @@ vmsdbgout_end_epilogue (unsigned int line, const char *file)
ASM_OUTPUT_LABEL (asm_out_file, label);
/* VMS PCA expects every PC range to correlate to some line and file. */
- vmsdbgout_source_line (line, file, 0, true);
+ vmsdbgout_write_source_line (line, file, 0, true);
}
}
@@ -1388,6 +1389,31 @@ lookup_filename (const char *file_name)
'line_info_table' for later output of the .debug_line section. */
static void
+vmsdbgout_write_source_line (unsigned line, const char *filename,
+ int discriminator, bool is_stmt)
+{
+ dst_line_info_ref line_info;
+
+ targetm.asm_out.internal_label (asm_out_file, LINE_CODE_LABEL,
+ line_info_table_in_use);
+
+ /* Expand the line info table if necessary. */
+ if (line_info_table_in_use == line_info_table_allocated)
+ {
+ line_info_table_allocated += LINE_INFO_TABLE_INCREMENT;
+ line_info_table = XRESIZEVEC (dst_line_info_entry, line_info_table,
+ line_info_table_allocated);
+ }
+
+ /* Add the new entry at the end of the line_info_table. */
+ line_info = &line_info_table[line_info_table_in_use++];
+ line_info->dst_file_num = lookup_filename (filename);
+ line_info->dst_line_num = line;
+ if (line > file_info_table[line_info->dst_file_num].max_line)
+ file_info_table[line_info->dst_file_num].max_line = line;
+}
+
+static void
vmsdbgout_source_line (register unsigned line, register const char *filename,
int discriminator, bool is_stmt)
{
@@ -1395,27 +1421,7 @@ vmsdbgout_source_line (register unsigned line, register const char *filename,
(*dwarf2_debug_hooks.source_line) (line, filename, discriminator, is_stmt);
if (debug_info_level >= DINFO_LEVEL_TERSE)
- {
- dst_line_info_ref line_info;
-
- targetm.asm_out.internal_label (asm_out_file, LINE_CODE_LABEL,
- line_info_table_in_use);
-
- /* Expand the line info table if necessary. */
- if (line_info_table_in_use == line_info_table_allocated)
- {
- line_info_table_allocated += LINE_INFO_TABLE_INCREMENT;
- line_info_table = XRESIZEVEC (dst_line_info_entry, line_info_table,
- line_info_table_allocated);
- }
-
- /* Add the new entry at the end of the line_info_table. */
- line_info = &line_info_table[line_info_table_in_use++];
- line_info->dst_file_num = lookup_filename (filename);
- line_info->dst_line_num = line;
- if (line > file_info_table[line_info->dst_file_num].max_line)
- file_info_table[line_info->dst_file_num].max_line = line;
- }
+ vmsdbgout_write_source_line (line, filename, discriminator, is_stmt);
}
/* Record the beginning of a new source file, for later output.