trace state variables -- what should be traced?

Yao Qi yao@codesourcery.com
Mon Sep 15 04:04:00 GMT 2014


David Taylor <dtaylor@emc.com> writes:

> variables, it can be set with an aop_setv operation.  Which value should
> be recorded?
>
> The old value?  Or the new value?

I prefer both.

>
> Currently the new value is always recorded and sometimes the old value
> is recorded as well.

Do you have an example that old value is *not* recorded?

>
> Since the old value, when it is recorded, is always recorded prior to
> recording the new value, the new value overwrites the old value.

The old value and the new value are recorded in the different 'V' blocks
of the traceframe, so the new value shouldn't overwrite the old value.
There was a bug in GDB that it reads the first matched tsv, so the old value
of this tsv may be read, but this bug was fixed by reading last matched
tsv <https://sourceware.org/ml/gdb-patches/2013-03/msg00255.html>

-- 
Yao (齐尧)



More information about the Gdb mailing list