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: [Precord RFA/RFC] Check Linux sys_brk release memory in process record and replay.


> Date: Wed, 6 May 2009 10:13:15 +0800
> From: Hui Zhu <teawater@gmail.com>
> Cc: gdb-patches@sourceware.org, msnyder@vmware.com
> 
> If inferior release some memory, the replay will got big error because
> prec will set memory old value to this memory.

Yes, I understand that, but why will this cause an error?

> >> ? ? ? * gdbarch.sh (process_record_reset): This interface point to
> >> ? ? ? the function that reset the architecture process record and
> >> ? ? ? replay.
> >
> > I think "reset" is not the best name for this. ?How about
> > "initialize"?
> 
> This interface will be call each time when prec open, so it will reset
> the old value.
> I think initialize looks like just call once.  For example
> "_initialize_infcall".

"reset" has the opposite problem: the first time you call it, it has
no old state to reset.

If you don't like "initialize", perhaps "reinitialize" or "reinit" is
okay?  It is still better than "reset", IMO, because "reset" is very
ambiguous in the context of tracking machine instructions.  It took me
several minutes to understand what is that all about and why are you
introducing such an interface together with the sbrk handling.

Or maybe "prepare" is better?


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