read_memory (copy, displaced_step_saved_copy, len);
if (debug_displaced)
{
- fprintf_unfiltered (gdb_stdlog, "displaced: saved 0x%s: ",
- paddr_nz (copy));
+ fprintf_unfiltered (gdb_stdlog, "displaced: saved %s: ",
+ paddress (gdbarch, copy));
displaced_step_dump_bytes (gdb_stdlog, displaced_step_saved_copy, len);
};
do_cleanups (old_cleanups);
if (debug_displaced)
- fprintf_unfiltered (gdb_stdlog, "displaced: displaced pc to 0x%s\n",
- paddr_nz (copy));
+ fprintf_unfiltered (gdb_stdlog, "displaced: displaced pc to %s\n",
+ paddress (gdbarch, copy));
return 1;
}
write_memory_ptid (displaced_step_ptid, displaced_step_copy,
displaced_step_saved_copy, len);
if (debug_displaced)
- fprintf_unfiltered (gdb_stdlog, "displaced: restored 0x%s\n",
- paddr_nz (displaced_step_copy));
+ fprintf_unfiltered (gdb_stdlog, "displaced: restored %s\n",
+ paddress (displaced_step_gdbarch,
+ displaced_step_copy));
}
/* Did the instruction complete successfully? */
{
struct displaced_step_request *head;
ptid_t ptid;
+ struct regcache *regcache;
CORE_ADDR actual_pc;
head = displaced_step_request_queue;
context_switch (ptid);
- actual_pc = regcache_read_pc (get_thread_regcache (ptid));
+ regcache = get_thread_regcache (ptid);
+ actual_pc = regcache_read_pc (regcache);
if (breakpoint_here_p (actual_pc))
{
if (debug_displaced)
{
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
gdb_byte buf[4];
- fprintf_unfiltered (gdb_stdlog, "displaced: run 0x%s: ",
- paddr_nz (actual_pc));
+ fprintf_unfiltered (gdb_stdlog, "displaced: run %s: ",
+ paddress (gdbarch, actual_pc));
read_memory (actual_pc, buf, sizeof (buf));
displaced_step_dump_bytes (gdb_stdlog, buf, sizeof (buf));
}
&& tp->trap_expected)
{
struct regcache *resume_regcache = get_thread_regcache (resume_ptid);
+ struct gdbarch *resume_gdbarch = get_regcache_arch (resume_regcache);
CORE_ADDR actual_pc = regcache_read_pc (resume_regcache);
gdb_byte buf[4];
- fprintf_unfiltered (gdb_stdlog, "displaced: run 0x%s: ",
- paddr_nz (actual_pc));
+ fprintf_unfiltered (gdb_stdlog, "displaced: run %s: ",
+ paddress (resume_gdbarch, actual_pc));
read_memory (actual_pc, buf, sizeof (buf));
displaced_step_dump_bytes (gdb_stdlog, buf, sizeof (buf));
}
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog,
- "infrun: proceed (addr=0x%s, signal=%d, step=%d)\n",
- paddr_nz (addr), siggnal, step);
+ "infrun: proceed (addr=%s, signal=%d, step=%d)\n",
+ paddress (gdbarch, addr), siggnal, step);
if (non_stop)
/* In non-stop, each thread is handled individually. The context
if (debug_infrun)
{
- fprintf_unfiltered (gdb_stdlog, "infrun: stop_pc = 0x%s\n",
- paddr_nz (stop_pc));
+ struct regcache *regcache = get_thread_regcache (ecs->ptid);
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
+
+ fprintf_unfiltered (gdb_stdlog, "infrun: stop_pc = %s\n",
+ paddress (gdbarch, stop_pc));
if (target_stopped_by_watchpoint ())
{
CORE_ADDR addr;
if (target_stopped_data_address (¤t_target, &addr))
fprintf_unfiltered (gdb_stdlog,
- "infrun: stopped data address = 0x%s\n",
- paddr_nz (addr));
+ "infrun: stopped data address = %s\n",
+ paddress (gdbarch, addr));
else
fprintf_unfiltered (gdb_stdlog,
"infrun: (no data address available)\n");
ecs->event_thread->step_frame_id)))
{
if (debug_infrun)
- fprintf_unfiltered (gdb_stdlog, "infrun: stepping inside range [0x%s-0x%s]\n",
- paddr_nz (ecs->event_thread->step_range_start),
- paddr_nz (ecs->event_thread->step_range_end));
+ fprintf_unfiltered
+ (gdb_stdlog, "infrun: stepping inside range [%s-%s]\n",
+ paddress (gdbarch, ecs->event_thread->step_range_start),
+ paddress (gdbarch, ecs->event_thread->step_range_end));
/* When stepping backward, stop at beginning of line range
(unless it's the function entry point, in which case
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog,
- "infrun: inserting step-resume breakpoint at 0x%s\n",
- paddr_nz (sr_sal.pc));
+ "infrun: inserting step-resume breakpoint at %s\n",
+ paddress (gdbarch, sr_sal.pc));
inferior_thread ()->step_resume_breakpoint
= set_momentary_breakpoint (gdbarch, sr_sal, sr_id, bp_step_resume);
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog,
- "infrun: inserting longjmp-resume breakpoint at 0x%s\n",
- paddr_nz (pc));
+ "infrun: inserting longjmp-resume breakpoint at %s\n",
+ paddress (gdbarch, pc));
inferior_thread ()->step_resume_breakpoint =
set_momentary_breakpoint_at_pc (gdbarch, pc, bp_longjmp_resume);