To debug the functions provided by the CoverageScanner API it is necessary to:
force CoverageScanner to keep the generated source file after compiling and linking. Therefore it is necessary to add
--cs-keep-instrumentation-files
to the compiler and linker command line arguments.compile the CoverageScanner library with debug information. Therefore it is necessary to add
--cs-libgen=-g
for GCC (or--cs-libgen=/Zi
for Microsoft Visual Studio) to the linker command line option. Once the application is recompiled, it is possible to set a breakpoint in__coveragescanner_save()
and step through the source code.