From: teawater <teawater@gmail.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: [RFA] Process record and replay, 6/10
Date: Thu, 06 Nov 2008 07:50:00 -0000 [thread overview]
Message-ID: <daef60380811052349l1d6a8de4wfcbd50f0faf38d89@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 901 bytes --]
This patch to add some process record and replay to infrun.c.
Code for function "use_displaced_stepping" is make sure that displaced
stepping function will disable when process record and replay target
is opened. Because process record and replay target doesn't support
displaced stepping function.
Code for function "proceed" is call function "record_not_record_set"
to set process record and replay target doesn't record the execute
log. Because when GDB resume the inferior, process record and replay
target doesn't need to record the memory and register store operation
of GDB.
2008-11-06 Hui Zhu <teawater@gmail.com>
* infrun.c (use_displaced_stepping): Return false if process
record and replay target is used.
(proceed): Call function "record_not_record_set" if pocess
record and replay target is used.
infrun.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
[-- Attachment #2: infrun.txt --]
[-- Type: text/plain, Size: 1052 bytes --]
--- a/infrun.c
+++ b/infrun.c
@@ -50,6 +50,8 @@
#include "mi/mi-common.h"
#include "event-top.h"
+#include "record.h"
+
/* Prototypes for local functions */
static void signals_info (char *, int);
@@ -602,7 +604,8 @@ use_displaced_stepping (struct gdbarch *
return (((can_use_displaced_stepping == can_use_displaced_stepping_auto
&& non_stop)
|| can_use_displaced_stepping == can_use_displaced_stepping_on)
- && gdbarch_displaced_step_copy_insn_p (gdbarch));
+ && gdbarch_displaced_step_copy_insn_p (gdbarch)
+ && !RECORD_IS_USED);
}
/* Clean out any stray displaced stepping state. */
@@ -1270,6 +1273,12 @@ proceed (CORE_ADDR addr, enum target_sig
if (step < 0)
stop_after_trap = 1;
+ /* When GDB resume the inferior, process record target doesn't need to
+ record the memory and register store operation of GDB. So set
+ record_not_record to 1. */
+ if (RECORD_IS_USED)
+ record_not_record_set ();
+
if (addr == (CORE_ADDR) -1)
{
if (pc == stop_pc && breakpoint_here_p (pc)
next reply other threads:[~2008-11-06 7:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-06 7:50 teawater [this message]
2008-11-07 15:17 ` Eli Zaretskii
2008-11-08 6:32 ` teawater
2008-11-08 9:26 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=daef60380811052349l1d6a8de4wfcbd50f0faf38d89@mail.gmail.com \
--to=teawater@gmail.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox