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 sets memory even when it says it did not


 

> -----Original Message-----
> From: Hui Zhu [mailto:teawater@gmail.com] 
> Sent: Monday, September 14, 2009 12:40 AM
> To: Marc Khouzam
> Cc: gdb@sourceware.org; Michael Snyder; gdb-patches ml
> Subject: Re: PRecord sets memory even when it says it did not
> 
...
> 
> Hi Marc,
> 
> Thanks for your help.
> 
> I just tried change it with "p a=99".  I think it must have something
> different with "set var a = 8".

I also tried it with p a=8 and in my case, the same things happens:
the memory is changed.

> This issue is because some value cache about the memory.  So I add a
> "free_all_values ();" before error.
> It looks OK now.  Please help me try it.

I tried with the patch and it did not fix the problem.
Let me know if I can do anything to help debug.
I'm seing this on both SLED and Ubuntu.


Thanks,
Marc


> 
> 2009-09-14  Hui Zhu  <teawater@gmail.com>
> 
> 	* record.c (record_xfer_partial): Call free_all_values when
> 	cancel the operation.
> 
> ---
>  record.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> --- a/record.c
> +++ b/record.c
> @@ -1023,7 +1023,10 @@ record_xfer_partial (struct target_ops *
>  		         "will make the execution log unusable 
> from this "
>  		         "point onward.  Write memory at address %s?"),
>  		       paddress (target_gdbarch, offset)))
> -	    error (_("Process record canceled the operation."));
> +	    {
> +	      free_all_values ();
> +	      error (_("Process record canceled the operation."));
> +	    }
> 
>  	  /* Destroy the record from here forward.  */
>  	  record_list_release_next ();
> 


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