Re: [patch][rfa] SID --trace-semantics output
[email protected] (Frank Ch. Eigler)
| Newsgroups | gmane.comp.tools.cgen.devel,gmane.comp.emulators.sid.devel |
|---|---|
| Message-ID | <[email protected]> |
brolley wrote: > A client of ours, for whom we're developing a SID port, requested > that SID's semantic trace show the actual value stored, accounting > for read-only fields and other side effects, rather than showing the > value which was attempted to be stored. [...] Especially for bits outside the CPU, this has the potential to mislead, in that the disassembly trace would not represent the actions of the CPU. > I eventually came up with the notion that the write/set methods of > SID's busses, control registers, memory access methods and hardware > write handers could return the actual value written. [...] I am quite unfond of this approach. It is a messy and limited way of providing just one more level of tracing. Have you considered instead of all this the addition of tracing flags in the various devices that thusly mutilate their data? That way, when they detect an incoming write (from whatever source), they can print the final afterimage. With carefully arranged tracing code in cgen_cpu, the additional messages from those peripherals could appear properly intermingled. The same technique could also handle the more general cases of control registers with read side effects, or accesses that span multiple different devices. - FChE