+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
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));
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));
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:
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: