Re: trace state variables -- what should be traced?
Yao Qi <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
David Taylor <[email protected]> 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 (齐尧)