]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2008-10-06 Michael Snyder <msnyder@vmware.com>
authorMichael Snyder <msnyder@vmware.com>
Tue, 7 Oct 2008 01:18:15 +0000 (01:18 +0000)
committerMichael Snyder <msnyder@vmware.com>
Tue, 7 Oct 2008 01:18:15 +0000 (01:18 +0000)
* record.c (displaced_step_fixup): Remove.
(record_message_cleanups): Remove displaced step handling.
(record_message): Remove displaced step handling.
* infrun.c (displaced_step_ptid): Back to being static.
(displaced_step_original, displaced_step_copy): Ditto.

gdb/ChangeLog
gdb/infrun.c
gdb/record.c

index 83f293721458b4dc58506423e47b3ceec4992aa2..1b4d16df429b991d0c2d8a3d86300c8150b43fa6 100644 (file)
@@ -1,5 +1,11 @@
 2008-10-06  Michael Snyder  <msnyder@vmware.com>
 
+       * record.c (displaced_step_fixup): Remove.
+       (record_message_cleanups): Remove displaced step handling.
+       (record_message): Remove displaced step handling.
+       * infrun.c (displaced_step_ptid): Back to being static.
+       (displaced_step_original, displaced_step_copy): Ditto.
+
        * breakpoint.c (breakpoint_silence): Rename to make_breakpoint_silent.
        * breakpoint.h: Ditto.
        * infcmd.c (finish_backward): Call make_breakpoint_silent
index 09a29b97ca85bdb827abfaf02afdae2fee240df2..d9a497945f0f648042d6933937f5dc02dd1cfc05 100644 (file)
@@ -594,9 +594,7 @@ static ptid_t deferred_step_ptid;
 /* If this is not null_ptid, this is the thread carrying out a
    displaced single-step.  This thread's state will require fixing up
    once it has completed its step.  */
-/* Record.c(record_message) use it to confirm if the next step is displaced
-   step. */
-ptid_t displaced_step_ptid;
+static ptid_t displaced_step_ptid;
 
 struct displaced_step_request
 {
@@ -615,9 +613,7 @@ static struct gdbarch *displaced_step_gdbarch;
 static struct displaced_step_closure *displaced_step_closure;
 
 /* The address of the original instruction, and the copy we made.  */
-/* Record.c(record_message) use them to get the original PC and set it back.
-   Because record_message need to record the original PC. */
-CORE_ADDR displaced_step_original, displaced_step_copy;
+static CORE_ADDR displaced_step_original, displaced_step_copy;
 
 /* Saved contents of copy area.  */
 static gdb_byte *displaced_step_saved_copy;
index 7b513ccfae8c3ccfadeadeffaee67e0dcb75ca86..b68445ab336b9b55ac5a872be57abebcfcb0c336 100644 (file)
@@ -37,9 +37,6 @@ record_t *record_arch_list_head = NULL;
 record_t *record_arch_list_tail = NULL;
 struct regcache *record_regcache = NULL;
 
-extern void displaced_step_fixup (ptid_t event_ptid,
-                                 enum target_signal signal);
-
 /* 0 ask user. 1 auto delete the last record_t.  */
 static int record_insn_max_mode = 0;
 static int record_insn_max_num = DEFAULT_RECORD_INSN_MAX_NUM;
@@ -54,8 +51,6 @@ static int record_not_record = 0;
 int record_will_store_registers = 0;
 
 extern struct bp_location *bp_location_chain;
-extern ptid_t displaced_step_ptid;
-extern CORE_ADDR displaced_step_original, displaced_step_copy;
 
 /* The real beneath function pointers.  */
 void (*record_beneath_to_resume) (ptid_t, int, enum target_signal);
@@ -326,11 +321,6 @@ static void
 record_message_cleanups (void *ignore)
 {
   record_list_release (record_arch_list_tail);
-
-  /* Clean for displaced stepping */
-  if (!ptid_equal (displaced_step_ptid, null_ptid))
-    displaced_step_fixup (displaced_step_ptid, TARGET_SIGNAL_TRAP);
-
   set_executing (inferior_ptid, 0);
   normal_stop ();
 }
@@ -349,24 +339,7 @@ record_message (struct gdbarch *gdbarch)
 
   record_regcache = get_current_regcache ();
 
-  if (!ptid_equal (displaced_step_ptid, null_ptid))
-    {
-      /* Deal with displaced stepping.  */
-      if (record_debug)
-       {
-         fprintf_unfiltered (gdb_stdlog,
-                             "Record: this stepping is displaced stepping.  Change PC register to original address 0x%s before call gdbarch_record.  After that, change it back to 0x%s.\n",
-                             paddr_nz (displaced_step_original),
-                             paddr_nz (displaced_step_copy));
-       }
-      regcache_write_pc (record_regcache, displaced_step_original);
-      ret = gdbarch_record (gdbarch, displaced_step_copy);
-      regcache_write_pc (record_regcache, displaced_step_copy);
-    }
-  else
-    {
-      ret = gdbarch_record (gdbarch, regcache_read_pc (record_regcache));
-    }
+  ret = gdbarch_record (gdbarch, regcache_read_pc (record_regcache));
 
   if (ret > 0)
     error (_("Record: record pause the program."));