Created by: Vincent-lau
This patch incorporated changes from patch #2442, and fixed some corner cases where the assumption was incorrect and caused the program to crash.
Trace support is not yet enabled by default, but can be enabled with "-enable_traces".
A large part of this work was based on work done by Kevin Zhou. Please see branch i1569-trace and patch #2442 for the original version.