diff options
author | Daniel Jacobowitz <drow@false.org> | 2006-10-11 15:39:35 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2006-10-11 15:39:35 +0000 |
commit | 366da635ba4e3110b6fb0a7cd06ff67291f03c71 (patch) | |
tree | 43cea3e813e6823b54ed0e9203b2ae2c2cf487c1 /gdb | |
parent | 07806542d5a4e7cc5364d82f3e2fc5e23ccdd1cb (diff) | |
download | gdb-366da635ba4e3110b6fb0a7cd06ff67291f03c71.zip gdb-366da635ba4e3110b6fb0a7cd06ff67291f03c71.tar.gz gdb-366da635ba4e3110b6fb0a7cd06ff67291f03c71.tar.bz2 |
* dwarf2read.c (dwarf_decode_lines): Call record_line upon
encountering a different subfile.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 24 |
2 files changed, 26 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ab1f1f9..92d0fe2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2006-10-11 Daniel Jacobowitz <dan@codesourcery.com> + + * dwarf2read.c (dwarf_decode_lines): Call record_line upon + encountering a different subfile. + 2006-10-11 Denis Pilat <denis.pilat@st.com> * tui/tui-source.c (tui_set_source_content): handle source diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 381585f..d026572 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -6625,6 +6625,7 @@ dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd, CORE_ADDR baseaddr; struct objfile *objfile = cu->objfile; const int decode_for_pst_p = (pst != NULL); + struct subfile *last_subfile = NULL; baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); @@ -6674,6 +6675,12 @@ dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd, lh->file_names[file - 1].included_p = 1; if (!decode_for_pst_p) { + if (last_subfile != current_subfile) + { + if (last_subfile) + record_line (last_subfile, 0, address); + last_subfile = current_subfile; + } /* Append row to matrix using current values. */ record_line (current_subfile, line, check_cu_functions (address, cu)); @@ -6728,8 +6735,16 @@ dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd, 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)); + { + if (last_subfile != current_subfile) + { + if (last_subfile) + record_line (last_subfile, 0, address); + last_subfile = current_subfile; + } + record_line (current_subfile, line, + check_cu_functions (address, cu)); + } basic_block = 0; break; case DW_LNS_advance_pc: @@ -6756,7 +6771,10 @@ dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd, dir = lh->include_dirs[fe->dir_index - 1]; if (!decode_for_pst_p) - dwarf2_start_subfile (fe->name, dir, comp_dir); + { + last_subfile = current_subfile; + dwarf2_start_subfile (fe->name, dir, comp_dir); + } } break; case DW_LNS_set_column: |