if (sal->pc == 0 && sal->symtab != NULL)
{
- if (!find_line_pc (sal->symtab, sal->line, &pc))
+ if (!find_pc_for_line (sal->symtab, sal->line, &pc))
error (_("No line %d in file \"%s\"."),
sal->line, symtab_to_filename_for_display (sal->symtab));
sal->pc = pc;
int ret;
CORE_ADDR start;
- ret = find_line_pc_range (sal, &start, &end);
+ ret = find_pc_range_for_sal (sal, &start, &end);
if (!ret)
error (_("Could not find location of the end of the range."));
- /* find_line_pc_range returns the start of the next line. */
+ /* find_pc_range_for_sal returns the start of the next line. */
end--;
}
pc = sal.pc;
if (sal.line)
- find_line_pc (sal.symtab, sal.line, &pc);
+ find_pc_for_line (sal.symtab, sal.line, &pc);
if (target_static_tracepoint_marker_at (pc, &marker))
{
s = lookup_symtab (current_program_space, file_string);
if (s == NULL)
error (_("-data-disassemble: Invalid filename."));
- if (!find_line_pc (s, line_num, &start))
+ if (!find_pc_for_line (s, line_num, &start))
error (_("-data-disassemble: Invalid line number"));
if (find_pc_partial_function (start, NULL, &low, &high) == 0)
error (_("-data-disassemble: "
error (_("Could not find the specified line"));
CORE_ADDR start_pc, end_pc;
- if (sal.line > 0 && find_line_pc_range (sal, &start_pc, &end_pc))
+ if (sal.line > 0 && find_pc_range_for_sal (sal, &start_pc, &end_pc))
tfind_1 (tfind_range, 0, start_pc, end_pc - 1, 0);
else
error (_("Could not find the specified line"));
gdb_printf ("\n");
}
else if (sal.line > 0
- && find_line_pc_range (sal, &start_pc, &end_pc))
+ && find_pc_range_for_sal (sal, &start_pc, &end_pc))
{
gdbarch *gdbarch = sal.symtab->compunit ()->objfile ()->arch ();
The source file is specified with a struct symtab. */
bool
-find_line_pc (struct symtab *symtab, int line, CORE_ADDR *pc)
+find_pc_for_line (struct symtab *symtab, int line, CORE_ADDR *pc)
{
const struct linetable *l;
int ind;
Returns false if could not find the specified line. */
bool
-find_line_pc_range (struct symtab_and_line sal, CORE_ADDR *startptr,
+find_pc_range_for_sal (struct symtab_and_line sal, CORE_ADDR *startptr,
CORE_ADDR *endptr)
{
CORE_ADDR startaddr;
struct symtab_and_line found_sal;
startaddr = sal.pc;
- if (startaddr == 0 && !find_line_pc (sal.symtab, sal.line, &startaddr))
+ if (startaddr == 0 && !find_pc_for_line (sal.symtab, sal.line, &startaddr))
return false;
/* This whole function is based on address. For example, if line 10 has
/* Given a symtab and line number, return the pc there. */
-extern bool find_line_pc (struct symtab *, int, CORE_ADDR *);
+extern bool find_pc_for_line (struct symtab *, int, CORE_ADDR *);
-extern bool find_line_pc_range (struct symtab_and_line, CORE_ADDR *,
- CORE_ADDR *);
+extern bool find_pc_range_for_sal (struct symtab_and_line, CORE_ADDR *,
+ CORE_ADDR *);
extern void resolve_sal_pc (struct symtab_and_line *);
error (_("No line number information available."));
CORE_ADDR start_pc, end_pc;
- if (sal.line > 0 && find_line_pc_range (sal, &start_pc, &end_pc))
+ if (sal.line > 0 && find_pc_range_for_sal (sal, &start_pc, &end_pc))
{
if (start_pc == end_pc)
{
gdb_printf (" but contains no code.\n");
sal = find_sal_for_pc (start_pc, 0);
if (sal.line > 0
- && find_line_pc_range (sal, &start_pc, &end_pc)
+ && find_pc_range_for_sal (sal, &start_pc, &end_pc)
&& start_pc != end_pc)
gdb_printf ("Attempting to find line %ps instead.\n",
styled_string (line_number_style.style (),
= get_current_source_symtab_and_line (current_program_space);
if (sal.symtab != nullptr)
- find_line_pc (sal.symtab, sal.line, &addr);
+ find_pc_for_line (sal.symtab, sal.line, &addr);
}
if (addr == 0)
line_no = m_start_line_or_addr.u.line_no;
cursal.line = line_no;
- find_line_pc (cursal.symtab, cursal.line, &cursal.pc);
+ find_pc_for_line (cursal.symtab, cursal.line, &cursal.pc);
for (struct tui_source_window_base *win_info : tui_source_windows ())
win_info->update_source_window_as_is (arch, cursal);
}
symtab_and_line cursal = get_current_source_symtab_and_line (current_program_space);
*gdbarch_p = m_gdbarch;
- find_line_pc (cursal.symtab, m_start_line_or_addr.u.line_no, addr_p);
+ find_pc_for_line (cursal.symtab, m_start_line_or_addr.u.line_no, addr_p);
}
/* See tui-winsource.h. */
struct gdbarch *gdbarch = nullptr;
if (sal.symtab != nullptr)
{
- find_line_pc (sal.symtab, sal.line, &sal.pc);
+ find_pc_for_line (sal.symtab, sal.line, &sal.pc);
gdbarch = sal.symtab->compunit ()->objfile ()->arch ();
}