* [RFA] Process record and replay, 6/10
@ 2008-11-06 7:50 teawater
2008-11-07 15:17 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: teawater @ 2008-11-06 7:50 UTC (permalink / raw)
To: gdb-patches
[-- 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)
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [RFA] Process record and replay, 6/10
2008-11-06 7:50 [RFA] Process record and replay, 6/10 teawater
@ 2008-11-07 15:17 ` Eli Zaretskii
2008-11-08 6:32 ` teawater
0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2008-11-07 15:17 UTC (permalink / raw)
To: teawater; +Cc: gdb-patches
> Date: Thu, 6 Nov 2008 15:49:27 +0800
> From: teawater <teawater@gmail.com>
>
> 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.
I think we should mention this incompatibility in the user manual.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA] Process record and replay, 6/10
2008-11-07 15:17 ` Eli Zaretskii
@ 2008-11-08 6:32 ` teawater
2008-11-08 9:26 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: teawater @ 2008-11-08 6:32 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb-patches
OK. I will put it to gdb.texinfo.
On Fri, Nov 7, 2008 at 23:15, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Thu, 6 Nov 2008 15:49:27 +0800
>> From: teawater <teawater@gmail.com>
>>
>> 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.
>
> I think we should mention this incompatibility in the user manual.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-11-08 9:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-06 7:50 [RFA] Process record and replay, 6/10 teawater
2008-11-07 15:17 ` Eli Zaretskii
2008-11-08 6:32 ` teawater
2008-11-08 9:26 ` Eli Zaretskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox