summaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2004-08-02 01:25:57 +0000
committerJoel Brobecker <brobecker@gnat.com>2004-08-02 01:25:57 +0000
commite7d30738d6c52b772e23f79cbcf01171f023aa95 (patch)
tree5a29a0ae421976599b66bac4a033729b7c442d84 /gdb/dwarf2read.c
parent8f9a4ed32b74b172b3bf8e9eaaddaea4dc163867 (diff)
downloadgdb-e7d30738d6c52b772e23f79cbcf01171f023aa95.tar.gz
* dwarf2read.c (dwarf_decode_lines): Do not consider the current
file as included until we record the first line in the linetable.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 7d1dafad00b..fa11475a691 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -5977,6 +5977,7 @@ dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd,
address += (adj_opcode / lh->line_range)
* lh->minimum_instruction_length;
line += lh->line_base + (adj_opcode % lh->line_range);
+ lh->file_names[file - 1].included_p = 1;
if (!decode_for_pst_p)
{
/* append row to matrix using current values */
@@ -5996,6 +5997,7 @@ dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd,
{
case DW_LNE_end_sequence:
end_sequence = 1;
+ lh->file_names[file - 1].included_p = 1;
if (!decode_for_pst_p)
record_line (current_subfile, 0, address);
break;
@@ -6030,6 +6032,7 @@ dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd,
}
break;
case DW_LNS_copy:
+ lh->file_names[file - 1].included_p = 1;
if (!decode_for_pst_p)
record_line (current_subfile, line,
check_cu_functions (address, cu));
@@ -6054,7 +6057,6 @@ dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd,
file = read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
line_ptr += bytes_read;
fe = &lh->file_names[file - 1];
- fe->included_p = 1;
if (fe->dir_index)
dir = lh->include_dirs[fe->dir_index - 1];
else