BullseyeCoverage
In the unlikely event an instrumented executable crashes, hangs or changes behavior when built with BullseyeCoverage, you can diagnose the problem by one of the methods listed below.
#pragma BullseyeCoverage off
to narrow down the problematic function and
then the statement. For more information on selecting code to
include or exclude, see Excluding Code.
A debugger may help locate the line of code where a crash occurs.
/* Display source location in a text-mode program */
#include <stdio.h>
…
fprintf(stderr, "%s %u\n", __FILE__, __LINE__);
/* Display source location in a Windows program */
#include <windows.h>
…
{
char buf[99];
wsprintf(buf, "%s %u\n", __FILE__, __LINE__);
MessageBox(0, buf, 0, 0);
}
/* Append source location to file in any program */
#include <stdio.h>
…
{
FILE * f = fopen("logfile", "a");
fprintf(f, "%s %u\n", __FILE__, __LINE__);
fclose(f);
}
Updated: 13 Nov 2020
Copyright © Bullseye Testing Technology. All Rights Reserved.