• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revision49133c575cfbdfb34fc55d26b323229ced906a39 (tree)
Time2008-12-28 05:28:12
AuthorMichael Snyder <msnyder@vmwa...>
CommiterMichael Snyder

Log Message

2008-12-26 Michael Snyder <msnyder@vmware.com>

* record.h: Don't export record_not_record.
* infrun.c (proceed): Don't call record_not_record_set.
* record.h (record_not_record): Rename to in_record_wait.
(record_not_record_set): Rename to in_record_wait_set.
(record_not_record_cleanup): Rename to in_record_wait_cleanup.
(record_store_registers): Check in_record_wait flag.
(record_xfer_partial): Ditto.

Change Summary

Incremental Difference

--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,15 @@
11 2008-12-26 Michael Snyder <msnyder@vmware.com>
22
3+ * record.h: Don't export record_not_record.
4+ * infrun.c (proceed): Don't call record_not_record_set.
5+ * record.h (record_not_record): Rename to in_record_wait.
6+ (record_not_record_set): Rename to in_record_wait_set.
7+ (record_not_record_cleanup): Rename to in_record_wait_cleanup.
8+ (record_store_registers): Check in_record_wait flag.
9+ (record_xfer_partial): Ditto.
10+
11+2008-12-26 Michael Snyder <msnyder@vmware.com>
12+
313 * Marker: adding teawater patches to branch.
414
515 2008-12-26 Sandra Loosemore <sandra@codesourcery.com>
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -1312,12 +1312,6 @@ proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
13121312 if (step < 0)
13131313 stop_after_trap = 1;
13141314
1315- /* When GDB resume the inferior, process record target doesn't need to
1316- record the memory and register store operation of GDB. So set
1317- record_not_record to 1. */
1318- if (RECORD_IS_USED)
1319- record_not_record_set ();
1320-
13211315 if (addr == (CORE_ADDR) -1)
13221316 {
13231317 if (pc == stop_pc && breakpoint_here_p (pc)
--- a/gdb/record.c
+++ b/gdb/record.c
@@ -47,7 +47,7 @@ static int record_resume_step = 0;
4747 static enum target_signal record_resume_siggnal;
4848 static int record_get_sig = 0;
4949 static sigset_t record_maskall;
50-static int record_not_record = 0;
50+static int in_record_wait = 0;
5151 int record_will_store_registers = 0;
5252
5353 extern struct bp_location *bp_location_chain;
@@ -364,19 +364,19 @@ record_message (struct gdbarch *gdbarch)
364364 }
365365 }
366366
367-/* Things to clean up if we QUIT out of function that set
368- record_not_record. */
367+/* Things to clean up if we error or QUIT out of function that set
368+ in_record_wait (ie. command that called 'proceed'). */
369369 static void
370-record_not_record_cleanups (void *ignore)
370+in_record_wait_cleanups (void *ignore)
371371 {
372- record_not_record = 0;
372+ in_record_wait = 0;
373373 }
374374
375375 void
376-record_not_record_set (void)
376+in_record_wait_set (void)
377377 {
378- struct cleanup *old_cleanups = make_cleanup (record_not_record_cleanups, 0);
379- record_not_record = 1;
378+ struct cleanup *old_cleanups = make_cleanup (in_record_wait_cleanups, 0);
379+ in_record_wait = 1;
380380 }
381381
382382 static void
@@ -483,6 +483,7 @@ record_wait_cleanups (void *ignore)
483483 static ptid_t
484484 record_wait (ptid_t ptid, struct target_waitstatus *status)
485485 {
486+ in_record_wait_set ();
486487 if (record_debug)
487488 {
488489 fprintf_unfiltered (gdb_stdlog,
@@ -696,10 +697,14 @@ record_wait (ptid_t ptid, struct target_waitstatus *status)
696697 paddr_nz ((CORE_ADDR)record_list),
697698 record_list->u.reg.num);
698699 }
700+ /* MVS: This step fetches the reg from the target. */
699701 regcache_cooked_read (regcache, record_list->u.reg.num, reg);
702+ /* MVS: This step writes the execution log reg to the target. */
700703 regcache_cooked_write (regcache, record_list->u.reg.num,
701704 record_list->u.reg.val);
705+ /* MVS: And this step saves the target reg in the exec log. */
702706 memcpy (record_list->u.reg.val, reg, MAX_REGISTER_SIZE);
707+ /* MVS: Net result -- swap. */
703708 }
704709 else if (record_list->type == record_mem)
705710 {
@@ -713,6 +718,8 @@ record_wait (ptid_t ptid, struct target_waitstatus *status)
713718 paddr_nz (record_list->u.mem.addr),
714719 record_list->u.mem.len);
715720 }
721+
722+ /* MVS: This step fetches 'mem' from the target. */
716723 if (target_read_memory
717724 (record_list->u.mem.addr, mem, record_list->u.mem.len))
718725 {
@@ -720,6 +727,8 @@ record_wait (ptid_t ptid, struct target_waitstatus *status)
720727 paddr_nz (record_list->u.mem.addr),
721728 record_list->u.mem.len);
722729 }
730+
731+ /* MVS: This step writes from the exec log to the target. */
723732 if (target_write_memory
724733 (record_list->u.mem.addr, record_list->u.mem.val,
725734 record_list->u.mem.len))
@@ -729,7 +738,9 @@ record_wait (ptid_t ptid, struct target_waitstatus *status)
729738 paddr_nz (record_list->u.mem.addr),
730739 record_list->u.mem.len);
731740 }
741+ /* MVS: And this step writes target 'mem' to the exec log. */
732742 memcpy (record_list->u.mem.val, mem, record_list->u.mem.len);
743+ /* MVS: Net result: swap. */
733744 }
734745 else
735746 {
@@ -937,7 +948,7 @@ record_registers_change (struct regcache *regcache, int regnum)
937948 static void
938949 record_store_registers (struct regcache *regcache, int regno)
939950 {
940- if (!record_not_record)
951+ if (!in_record_wait)
941952 {
942953 if (RECORD_IS_REPLAY)
943954 {
@@ -1000,7 +1011,7 @@ record_xfer_partial (struct target_ops *ops, enum target_object object,
10001011 const char *annex, gdb_byte * readbuf,
10011012 const gdb_byte * writebuf, ULONGEST offset, LONGEST len)
10021013 {
1003- if (!record_not_record
1014+ if (!in_record_wait
10041015 && (object == TARGET_OBJECT_MEMORY
10051016 || object == TARGET_OBJECT_RAW_MEMORY) && writebuf)
10061017 {
@@ -1058,7 +1069,6 @@ record_xfer_partial (struct target_ops *ops, enum target_object object,
10581069 record_insn_num++;
10591070 }
10601071 }
1061-
10621072 return record_beneath_to_xfer_partial (ops, object, annex, readbuf,
10631073 writebuf, offset, len);
10641074 }
@@ -1071,7 +1081,7 @@ record_xfer_partial (struct target_ops *ops, enum target_object object,
10711081 static int
10721082 record_insert_breakpoint (struct bp_target_info *bp_tgt)
10731083 {
1074- if (!RECORD_IS_REPLAY)
1084+ if (!RECORD_IS_USED)
10751085 {
10761086 return record_beneath_to_insert_breakpoint (bp_tgt);
10771087 }
@@ -1082,7 +1092,7 @@ record_insert_breakpoint (struct bp_target_info *bp_tgt)
10821092 static int
10831093 record_remove_breakpoint (struct bp_target_info *bp_tgt)
10841094 {
1085- if (!RECORD_IS_REPLAY)
1095+ if (!RECORD_IS_USED)
10861096 {
10871097 return record_beneath_to_remove_breakpoint (bp_tgt);
10881098 }
--- a/gdb/record.h
+++ b/gdb/record.h
@@ -80,7 +80,6 @@ extern int record_arch_list_add_reg (int num);
8080 extern int record_arch_list_add_mem (CORE_ADDR addr, int len);
8181 extern int record_arch_list_add_end (int need_dasm);
8282 extern void record_message (struct gdbarch *gdbarch);
83-extern void record_not_record_set (void);
8483
8584 extern void (*record_beneath_to_resume) (ptid_t, int, enum target_signal);
8685 extern ptid_t (*record_beneath_to_wait) (ptid_t, struct target_waitstatus *);