X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;ds=sidebyside;f=gdb%2Fgdbarch.c;fp=gdb%2Fgdbarch.c;h=597e10735cb83ef14ba398f2be431dae46ea04dd;hb=5514706f739978e0897d01ec9fa25fa61861c263;hp=e7d94a3b47a13e9a56abb352add596a4cf8524d7;hpb=348a832d84a566eb9e8a8bed87c274f7b0e2579f;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index e7d94a3b47..597e10735c 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -443,7 +443,6 @@ gdbarch_alloc (const struct gdbarch_info *info, gdbarch->skip_permanent_breakpoint = default_skip_permanent_breakpoint; gdbarch->displaced_step_hw_singlestep = default_displaced_step_hw_singlestep; gdbarch->displaced_step_fixup = NULL; - gdbarch->displaced_step_prepare = NULL; gdbarch->displaced_step_finish = NULL; gdbarch->relocate_instruction = NULL; gdbarch->has_shared_address_space = default_has_shared_address_space; @@ -655,9 +654,8 @@ verify_gdbarch (struct gdbarch *gdbarch) /* Skip verify of displaced_step_copy_insn, has predicate. */ /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */ /* Skip verify of displaced_step_fixup, has predicate. */ - if ((! gdbarch->displaced_step_prepare) != (! gdbarch->displaced_step_copy_insn)) - log.puts ("\n\tdisplaced_step_prepare"); - if ((! gdbarch->displaced_step_finish) != (! gdbarch->displaced_step_copy_insn)) + /* Skip verify of displaced_step_prepare, has predicate. */ + if ((! gdbarch->displaced_step_finish) != (! gdbarch->displaced_step_prepare)) log.puts ("\n\tdisplaced_step_finish"); /* Skip verify of relocate_instruction, has predicate. */ /* Skip verify of overlay_update, has predicate. */ @@ -927,6 +925,9 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) fprintf_unfiltered (file, "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n", host_address_to_string (gdbarch->displaced_step_hw_singlestep)); + fprintf_unfiltered (file, + "gdbarch_dump: gdbarch_displaced_step_prepare_p() = %d\n", + gdbarch_displaced_step_prepare_p (gdbarch)); fprintf_unfiltered (file, "gdbarch_dump: displaced_step_prepare = <%s>\n", host_address_to_string (gdbarch->displaced_step_prepare)); @@ -3992,6 +3993,13 @@ set_gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, gdbarch->displaced_step_fixup = displaced_step_fixup; } +int +gdbarch_displaced_step_prepare_p (struct gdbarch *gdbarch) +{ + gdb_assert (gdbarch != NULL); + return gdbarch->displaced_step_prepare != NULL; +} + displaced_step_prepare_status gdbarch_displaced_step_prepare (struct gdbarch *gdbarch, thread_info *thread) {