linetable_entry *last = &subfile->line_vector_entries.back ();
last_line = last->line;
- if (last->raw_pc () != pc)
+ if (last->unrelocated_pc () != pc)
break;
subfile->line_vector_entries.pop_back ();
linetable_entry &e = subfile->line_vector_entries.back ();
e.line = line;
e.is_stmt = (flags & LEF_IS_STMT) != 0;
- e.set_raw_pc (pc);
+ e.set_unrelocated_pc (pc);
e.prologue_end = (flags & LEF_PROLOGUE_END) != 0;
}
/* First, skip all the preceding functions. */
- for (i = 0; i < nlines - 1 && le[i].raw_pc () < unrel_low; i++);
+ for (i = 0; i < nlines - 1 && le[i].unrelocated_pc () < unrel_low; i++);
/* Now, copy all entries before the end of this function. */
- for (; i < nlines - 1 && le[i].raw_pc () < unrel_high; i++)
+ for (; i < nlines - 1 && le[i].unrelocated_pc () < unrel_high; i++)
{
if (le[i] == le[i + 1])
continue; /* Ignore duplicates. */
/* If we're on the last line, and it's part of the function,
then we need to get the end pc in a special way. */
- if (i == nlines - 1 && le[i].raw_pc () < unrel_high)
+ if (i == nlines - 1 && le[i].unrelocated_pc () < unrel_high)
{
mle[newlines].line = le[i].line;
mle[newlines].start_pc = le[i].pc (objfile);
first_le = NULL;
/* Skip all the preceding functions. */
- for (i = 0; i < nlines && le[i].raw_pc () < unrel_low; i++)
+ for (i = 0; i < nlines && le[i].unrelocated_pc () < unrel_low; i++)
continue;
- if (i < nlines && le[i].raw_pc () < unrel_high)
+ if (i < nlines && le[i].unrelocated_pc () < unrel_high)
first_le = &le[i];
/* Add lines for every pc value. */
stab->linetable->nitems = nlines;
for (i = 0; i < nlines; i++)
{
- stab->linetable->item[i].set_raw_pc (unrelocated_addr (map[i].pc));
+ stab->linetable->item[i].set_unrelocated_pc
+ (unrelocated_addr (map[i].pc));
stab->linetable->item[i].line = map[i].line;
stab->linetable->item[i].is_stmt = true;
}
return lineno;
lt->item[lt->nitems].line = lineno;
- lt->item[lt->nitems++].set_raw_pc (unrelocated_addr (adr << 2));
+ lt->item[lt->nitems++].set_unrelocated_pc (unrelocated_addr (adr << 2));
return lineno;
}
\f
possibly adding more line numbers to the range. At the time this
change was made I was unsure how to test this so chose to go with
maintaining the existing experience. */
- if (lines[i].raw_pc () == unrel_pc && lines[i].line != 0
+ if (lines[i].unrelocated_pc () == unrel_pc && lines[i].line != 0
&& lines[i].is_stmt)
range = btrace_line_range_add (range, lines[i].line);
}
uiout->field_core_addr ("rel-address", objfile->arch (),
item->pc (objfile));
uiout->field_core_addr ("unrel-address", objfile->arch (),
- CORE_ADDR (item->raw_pc ()));
+ CORE_ADDR (item->unrelocated_pc ()));
uiout->field_string ("is-stmt", item->is_stmt ? "Y" : "");
uiout->field_string ("prologue-end", item->prologue_end ? "Y" : "");
uiout->text ("\n");
/* Is this file's first line closer than the first lines of other files?
If so, record this file, and its first line, as best alternate. */
if (item->pc (objfile) > pc
- && (!alt || item->raw_pc () < alt->raw_pc ()))
+ && (!alt || item->unrelocated_pc () < alt->unrelocated_pc ()))
alt = item;
auto pc_compare = [] (const unrelocated_addr &comp_pc,
const struct linetable_entry & lhs)
{
- return comp_pc < lhs.raw_pc ();
+ return comp_pc < lhs.unrelocated_pc ();
};
const linetable_entry *first = item;
save prev if it represents the end of a function (i.e. line number
0) instead of a real line. */
- if (prev && prev->line && (!best || prev->raw_pc () > best->raw_pc ()))
+ if (prev && prev->line
+ && (!best || prev->unrelocated_pc () > best->unrelocated_pc ()))
{
best = prev;
best_symtab = iter_s;
if (!best->is_stmt)
{
const linetable_entry *tmp = best;
- while (tmp > first && (tmp - 1)->raw_pc () == tmp->raw_pc ()
+ while (tmp > first
+ && (tmp - 1)->unrelocated_pc () == tmp->unrelocated_pc ()
&& (tmp - 1)->line != 0 && !tmp->is_stmt)
--tmp;
if (tmp->is_stmt)
/* If another line (denoted by ITEM) is in the linetable and its
PC is after BEST's PC, but before the current BEST_END, then
use ITEM's PC as the new best_end. */
- if (best && item < last && item->raw_pc () > best->raw_pc ()
+ if (best && item < last
+ && item->unrelocated_pc () > best->unrelocated_pc ()
&& (best_end == 0 || best_end > item->pc (objfile)))
best_end = item->pc (objfile);
}
(linetable->item, linetable->item + linetable->nitems, unrel_start,
[] (const linetable_entry <e, unrelocated_addr pc)
{
- return lte.raw_pc () < pc;
+ return lte.unrelocated_pc () < pc;
});
for (;
(it < linetable->item + linetable->nitems
- && it->raw_pc () < unrel_end);
+ && it->unrelocated_pc () < unrel_end);
it++)
if (it->prologue_end)
return {it->pc (objfile)};
struct linetable_entry
{
/* Set the (unrelocated) PC for this entry. */
- void set_raw_pc (unrelocated_addr pc)
+ void set_unrelocated_pc (unrelocated_addr pc)
{ m_pc = pc; }
/* Return the unrelocated PC for this entry. */
- unrelocated_addr raw_pc () const
+ unrelocated_addr unrelocated_pc () const
{ return m_pc; }
/* Return the relocated PC for this entry. */
function prologue. */
bool prologue_end : 1;
+private:
+
/* The address for this entry. */
unrelocated_addr m_pc;
};
linetable_entry &e = fentries.back ();
e.line = ii;
e.is_stmt = true;
- e.set_raw_pc (old_linetable[ii].raw_pc ());
+ e.set_unrelocated_pc (old_linetable[ii].unrelocated_pc ());
}
}
extra line to cover the function prologue. */
int jj = entry.line;
if (jj + 1 < old_linetable.size ()
- && old_linetable[jj].raw_pc () != old_linetable[jj + 1].raw_pc ())
+ && (old_linetable[jj].unrelocated_pc ()
+ != old_linetable[jj + 1].unrelocated_pc ()))
{
new_linetable.push_back (old_linetable[jj]);
new_linetable.back ().line = old_linetable[jj + 1].line;