This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: PRecord sets memory even when it says it did not
- From: Marc Khouzam <marc dot khouzam at ericsson dot com>
- To: "'Hui Zhu'" <teawater at gmail dot com>
- Cc: "'Michael Snyder'" <msnyder at vmware dot com>, "'gdb-patches ml'" <gdb-patches at sourceware dot org>
- Date: Mon, 14 Sep 2009 09:51:04 -0400
- Subject: RE: PRecord sets memory even when it says it did not
- References: <F7CE05678329534C957159168FA70DEC5153600749@EUSAACMS0703.eamcs.ericsson.se> <daef60380909132139k46f577aet63f4089a97138368@mail.gmail.com>
> -----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 ();
>