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);
}
static void
btrace_print_lines (struct btrace_line_range lines, struct ui_out *uiout,
- gdb::optional<ui_out_emit_tuple> *src_and_asm_tuple,
- gdb::optional<ui_out_emit_list> *asm_list,
+ std::optional<ui_out_emit_tuple> *src_and_asm_tuple,
+ std::optional<ui_out_emit_list> *asm_list,
gdb_disassembly_flags flags)
{
print_source_lines_flags psl_flags;
flags |= DISASSEMBLY_SPECULATIVE;
- struct gdbarch *gdbarch = target_gdbarch ();
+ gdbarch *gdbarch = current_inferior ()->arch ();
btrace_line_range last_lines = btrace_mk_line_range (NULL, 0, 0);
ui_out_emit_list list_emitter (uiout, "asm_insns");
- gdb::optional<ui_out_emit_tuple> src_and_asm_tuple;
- gdb::optional<ui_out_emit_list> asm_list;
+ std::optional<ui_out_emit_tuple> src_and_asm_tuple;
+ std::optional<ui_out_emit_list> asm_list;
gdb_pretty_print_disassembler disasm (gdbarch, uiout);
if (insn == NULL)
return 0;
- return record_check_stopped_by_breakpoint (tp->inf->aspace, insn->pc,
+ return record_check_stopped_by_breakpoint (tp->inf->aspace.get (), insn->pc,
&btinfo->stop_reason);
}
/* Start anew from the new replay position. */
record_btrace_clear_histories (btinfo);
- inferior_thread ()->set_stop_pc (regcache_read_pc (get_current_regcache ()));
+ tp->set_stop_pc (regcache_read_pc (get_thread_regcache (tp)));
print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC, 1);
}