RE: PRecord sets memory even when it says it did not

Marc Khouzam
2009-09-14T13:52:03Z

> -----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 ();
>