This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Resubmit process record and replay, 6/10


Hi Michael,

About "record_not_record_set", It set record_not_record to let P
record doesn't record the memory and registers control behaviors of
GDB in function record_store_registers and record_xfer_partial.

So I think the name "record_not_record_set" and
"record_skip_recording" are not very clear.
Could you please give me some advices on it?

Thanks,
Hui

On Thu, Nov 20, 2008 at 09:55, Michael Snyder <msnyder@vmware.com> wrote:
> teawater wrote:
>>
>> 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.
>
> Hui, a couple of suggestions:
>
> 1) Instead of "RECORD_IS_USED", how about "TARGET_IS_PROCESS_RECORD"?
>
> 2) Instead of "record_not_record_set", how about "record_skip_recording"?
>
>
> Except for the names, I think this portion of the patch
> is nicely self-contained.
>
>>
>> 2008-11-16  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(-)
>>
>>
>> ------------------------------------------------------------------------
>>
>> --- 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)
>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]