diff options
author | Hui Zhu <teawater@gmail.com> | 2008-11-06 02:18:10 +0000 |
---|---|---|
committer | Hui Zhu <teawater@gmail.com> | 2008-11-06 02:18:10 +0000 |
commit | 58daec0383c8af898ff653484ca30f6f7fe40fb8 (patch) | |
tree | 0d0ee893040da4809cf24e5ca876261e27827f1f /gdb/record.c | |
parent | fc9fcca80df5fec41e30c47a55bfc24133d4c0cc (diff) | |
download | gdb-cvs/reverse-20080930-branch.tar.gz |
2008-11-06 Hui Zhu <teawater@gmail.com>cvs/reverse-20080930-branch
* record.c (record_wait): Set pc if forward execute,
gdbarch_decr_pc_after_break is not 0 and this is not single
step in replay mode.
* linux-nat.c (my_waitpid_record): Add
gdbarch_decr_pc_after_break to pc if need.
Diffstat (limited to 'gdb/record.c')
-rw-r--r-- | gdb/record.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/record.c b/gdb/record.c index 191cb3e5395..fec545f7ded 100644 --- a/gdb/record.c +++ b/gdb/record.c @@ -513,6 +513,14 @@ record_wait (ptid_t ptid, struct target_waitstatus *status) "Process record: break at 0x%s.\n", paddr_nz (tmp_pc)); } + if (gdbarch_decr_pc_after_break (get_regcache_arch (regcache)) + && !record_resume_step) + { + regcache_write_pc (regcache, + tmp_pc + + gdbarch_decr_pc_after_break + (get_regcache_arch (regcache))); + } goto replay_out; } } @@ -655,6 +663,15 @@ record_wait (ptid_t ptid, struct target_waitstatus *status) "Process record: break at 0x%s.\n", paddr_nz (tmp_pc)); } + if (gdbarch_decr_pc_after_break (get_regcache_arch (regcache)) + && execution_direction == EXEC_FORWARD + && !record_resume_step) + { + regcache_write_pc (regcache, + tmp_pc + + gdbarch_decr_pc_after_break + (get_regcache_arch (regcache))); + } continue_flag = 0; } } |