This section provides an example of monitoring the effect of a bug fix.
Compile the target source before the fix.
% cc -g *.c
Instrument the binary using Discover and make sure it generates Analytics output.
% discover -a a.out
Run the instrumented binary.
Use codean to store the analytics output. The history archive is created at a.out.analyze/history/before_bugfix and a history file called dynamic is created in this directory.
% codean --save --tag before_bugfix -d a.out
Fix the bug.
Compile the target source again.
% cc -g *.c
Instrument the binary again using discover.
% discover -a a.out
Run the instrumented binary.
% a.out
Show comparison results and ensure that the invalid memory access caused by the bug is fixed.
% codean --whatisfixed --tag before_bugfix -d a.out
This produces a new Analytics output file at a.out.analyze/dynamic/fixed_before_bugfix and that contains only fixed dynamic issues. You can use codean or the Code Analyzer GUI to view these fixed issues.
(Optional) Run codean to ensure you did not introduce any new bugs.
% codean --whatisnew --tag before_bugfix -d a.out
This command produces a new analytics file at a.out.analyze/dynamic/new_before_bugfix that contains only new dynamic issues.