change log for gcc-testing (2010-05-11)
rtems-vc at rtems.org
rtems-vc at rtems.org
Tue May 11 22:10:03 UTC 2010
*joel*:
2010-05-11 Joel Sherrill <joel.sherrilL at OARcorp.com>
* ReportsBase.h: Spacing.
M 1.222 rtems-coverage/ChangeLog
M 1.4 rtems-coverage/ReportsBase.h
diff -u gcc-testing/rtems-coverage/ChangeLog:1.221 gcc-testing/rtems-coverage/ChangeLog:1.222
--- gcc-testing/rtems-coverage/ChangeLog:1.221 Tue May 11 16:09:53 2010
+++ gcc-testing/rtems-coverage/ChangeLog Tue May 11 16:10:21 2010
@@ -1,3 +1,7 @@
+2010-05-11 Joel Sherrill <joel.sherrilL at OARcorp.com>
+
+ * ReportsBase.h: Spacing.
+
2010-05-11 Glenn Humphrey
* ReportsBase.cc: Fixed buffer overflow problem.
diff -u gcc-testing/rtems-coverage/ReportsBase.h:1.3 gcc-testing/rtems-coverage/ReportsBase.h:1.4
--- gcc-testing/rtems-coverage/ReportsBase.h:1.3 Mon May 10 13:10:16 2010
+++ gcc-testing/rtems-coverage/ReportsBase.h Tue May 11 16:10:21 2010
@@ -86,119 +86,118 @@
A_NEVER_EXECUTED,
A_BRANCH_TAKEN,
A_BRANCH_NOT_TAKEN
- }AnnotatedLineState_t;
+ } AnnotatedLineState_t;
/*!
* This member variable contains the extension used for all reports.
*/
std::string reportExtension_m;
-
- /*!
- * This method Opens a report file and verifies that it opended
- * correctly. Upon failure NULL is returned.
- *
- * @param[in] fileName identifies the size report file name
- */
+ /*!
+ * This method Opens a report file and verifies that it opended
+ * correctly. Upon failure NULL is returned.
+ *
+ * @param[in] fileName identifies the size report file name
+ */
virtual FILE* OpenFile(
const char* const fileName
);
- /*!
- * This method d Opens a report file and verifies that it opended.
- * Then appedns any necessary header information onto the file.
- *
- * @param[in] fileName identifies the size report file name
- */
+ /*!
+ * This method d Opens a report file and verifies that it opended.
+ * Then appedns any necessary header information onto the file.
+ *
+ * @param[in] fileName identifies the size report file name
+ */
virtual FILE* OpenAnnotatedFile(
const char* const fileName
);
- /*!
- * This method d Opens a report file and verifies that it opended.
- * Then appedns any necessary header information onto the file.
- *
- * @param[in] fileName identifies the size report file name
- */
+ /*!
+ * This method d Opens a report file and verifies that it opended.
+ * Then appedns any necessary header information onto the file.
+ *
+ * @param[in] fileName identifies the size report file name
+ */
virtual FILE* OpenBranchFile(
const char* const fileName
);
- /*!
- * This method d Opens a report file and verifies that it opended.
- * Then appedns any necessary header information onto the file.
- *
- * @param[in] fileName identifies the size report file name
- */
+ /*!
+ * This method d Opens a report file and verifies that it opended.
+ * Then appedns any necessary header information onto the file.
+ *
+ * @param[in] fileName identifies the size report file name
+ */
virtual FILE* OpenCoverageFile(
const char* const fileName
);
- /*!
- * This method d Opens a report file and verifies that it opended.
- * Then appedns any necessary header information onto the file.
- *
- * @param[in] fileName identifies the size report file name
- */
+ /*!
+ * This method d Opens a report file and verifies that it opended.
+ * Then appedns any necessary header information onto the file.
+ *
+ * @param[in] fileName identifies the size report file name
+ */
virtual FILE* OpenSizeFile(
const char* const fileName
);
- /*!
- * This method Closes a report file.
- *
- * @param[in] fileName identifies the size report file name
- */
+ /*!
+ * This method Closes a report file.
+ *
+ * @param[in] fileName identifies the size report file name
+ */
void CloseFile(
FILE* aFile
);
- /*!
- * This method puts any necessary footer information into
- * the report then closes the file.
- *
- * @param[in] fileName identifies the size report file name
- */
+ /*!
+ * This method puts any necessary footer information into
+ * the report then closes the file.
+ *
+ * @param[in] fileName identifies the size report file name
+ */
virtual void CloseAnnotatedFile(
FILE* aFile
);
- /*!
- * This method puts any necessary footer information into
- * the report then closes the file.
- *
- * @param[in] fileName identifies the size report file name
- */
+ /*!
+ * This method puts any necessary footer information into
+ * the report then closes the file.
+ *
+ * @param[in] fileName identifies the size report file name
+ */
virtual void CloseBranchFile(
FILE* aFile
);
- /*!
- * This method puts any necessary footer information into
- * the report then closes the file.
- *
- * @param[in] fileName identifies the size report file name
- */
+ /*!
+ * This method puts any necessary footer information into
+ * the report then closes the file.
+ *
+ * @param[in] fileName identifies the size report file name
+ */
virtual void CloseCoverageFile(
FILE* aFile
);
- /*!
- * This method puts any necessary footer information into
- * the report then closes the file.
- *
- * @param[in] fileName identifies the size report file name
- */
+ /*!
+ * This method puts any necessary footer information into
+ * the report then closes the file.
+ *
+ * @param[in] fileName identifies the size report file name
+ */
virtual void CloseSizeFile(
FILE* aFile
);
- /*!
- * This method puts any necessary footer information into
- * the report then closes the file.
- *
- * @param[in] fileName identifies the size report file name
- */
+ /*!
+ * This method puts any necessary footer information into
+ * the report then closes the file.
+ *
+ * @param[in] fileName identifies the size report file name
+ */
virtual void PutAnnotatedLine(
FILE* aFile,
AnnotatedLineState_t state,
@@ -206,21 +205,21 @@
uint32_t id
)=0;
- /*!
- * This method puts any necessary footer information into
- * the report then closes the file.
- *
- * @param[in] fileName identifies the size report file name
- */
+ /*!
+ * This method puts any necessary footer information into
+ * the report then closes the file.
+ *
+ * @param[in] fileName identifies the size report file name
+ */
virtual bool PutNoBranchInfo(
FILE* report
) = 0;
- /*!
- * This method puts a branch entry into the branch report.
- *
- * @param[in] fileName identifies the size report file name
- */
+ /*!
+ * This method puts a branch entry into the branch report.
+ *
+ * @param[in] fileName identifies the size report file name
+ */
virtual bool PutBranchEntry(
FILE* report,
unsigned int number,
@@ -228,23 +227,23 @@
Coverage::CoverageRanges::ranges_t::iterator rangePtr
)=0;
- /*!
- * This method reports when no range is available for
- * a symbol in the coverage report.
- *
- * @param[in] fileName identifies the size report file name
- */
+ /*!
+ * This method reports when no range is available for
+ * a symbol in the coverage report.
+ *
+ * @param[in] fileName identifies the size report file name
+ */
virtual void putCoverageNoRange(
FILE* report,
unsigned int number,
std::string symbol
)=0;
- /*!
- * This method puts a line in the coverage report.
- *
- * @param[in] fileName identifies the size report file name
- */
+ /*!
+ * This method puts a line in the coverage report.
+ *
+ * @param[in] fileName identifies the size report file name
+ */
virtual bool PutCoverageLine(
FILE* report,
unsigned int number,
@@ -252,11 +251,11 @@
Coverage::CoverageRanges::ranges_t::iterator ritr
)=0;
- /*!
- * This method method puts a line into the size report.
- *
- * @param[in] fileName identifies the size report file name
- */
+ /*!
+ * This method method puts a line into the size report.
+ *
+ * @param[in] fileName identifies the size report file name
+ */
virtual bool PutSizeLine(
FILE* report,
unsigned int number,
*joel*:
2010-05-11 Joel Sherrill <joel.sherrilL at OARcorp.com>
* ReportsBase.cc, ReportsBase.h, ReportsHtml.cc, ReportsHtml.h,
ReportsText.cc: Properly report on no branch information available.
Distinguish between no branch information available and 100% branch
coverage.
M 1.223 rtems-coverage/ChangeLog
M 1.5 rtems-coverage/ReportsBase.h
M 1.8 rtems-coverage/ReportsBase.cc
M 1.3 rtems-coverage/ReportsHtml.h
M 1.4 rtems-coverage/ReportsHtml.cc
M 1.4 rtems-coverage/ReportsText.cc
diff -u gcc-testing/rtems-coverage/ChangeLog:1.222 gcc-testing/rtems-coverage/ChangeLog:1.223
--- gcc-testing/rtems-coverage/ChangeLog:1.222 Tue May 11 16:10:21 2010
+++ gcc-testing/rtems-coverage/ChangeLog Tue May 11 16:21:25 2010
@@ -1,5 +1,12 @@
2010-05-11 Joel Sherrill <joel.sherrilL at OARcorp.com>
+ * ReportsBase.cc, ReportsBase.h, ReportsHtml.cc, ReportsHtml.h,
+ ReportsText.cc: Properly report on no branch information available.
+ Distinguish between no branch information available and 100% branch
+ coverage.
+
+2010-05-11 Joel Sherrill <joel.sherrilL at OARcorp.com>
+
* ReportsBase.h: Spacing.
2010-05-11 Glenn Humphrey
diff -u gcc-testing/rtems-coverage/ReportsBase.h:1.4 gcc-testing/rtems-coverage/ReportsBase.h:1.5
--- gcc-testing/rtems-coverage/ReportsBase.h:1.4 Tue May 11 16:10:21 2010
+++ gcc-testing/rtems-coverage/ReportsBase.h Tue May 11 16:21:25 2010
@@ -118,9 +118,11 @@
* Then appedns any necessary header information onto the file.
*
* @param[in] fileName identifies the size report file name
+ * @param[in] hasBranches indicates if there are branches to report
*/
virtual FILE* OpenBranchFile(
- const char* const fileName
+ const char* const fileName,
+ bool hasBranches
);
/*!
@@ -167,9 +169,11 @@
* the report then closes the file.
*
* @param[in] fileName identifies the size report file name
+ * @param[in] hasBranches indicates if there are branches to report
*/
virtual void CloseBranchFile(
- FILE* aFile
+ FILE* aFile,
+ bool hasBranches
);
/*!
diff -u gcc-testing/rtems-coverage/ReportsBase.cc:1.7 gcc-testing/rtems-coverage/ReportsBase.cc:1.8
--- gcc-testing/rtems-coverage/ReportsBase.cc:1.7 Tue May 11 16:09:53 2010
+++ gcc-testing/rtems-coverage/ReportsBase.cc Tue May 11 16:21:25 2010
@@ -65,7 +65,8 @@
}
FILE* ReportsBase::OpenBranchFile(
- const char* const fileName
+ const char* const fileName,
+ bool hasBranches
)
{
return OpenFile(fileName);
@@ -101,7 +102,8 @@
}
void ReportsBase::CloseBranchFile(
- FILE* aFile
+ FILE* aFile,
+ bool hasBranches
)
{
CloseFile( aFile );
@@ -217,17 +219,23 @@
Coverage::CoverageRanges::ranges_t::iterator ritr;
Coverage::CoverageRanges* theBranches;
unsigned int count;
+ bool hasBranches = true;
- // Open the branch report file
- report = OpenBranchFile( fileName );
+ if ((SymbolsToAnalyze->getNumberBranchesFound() == 0) ||
+ (BranchInfoAvailable == false) )
+ hasBranches = false;
+ // Open the branch report file
+ report = OpenBranchFile( fileName, hasBranches );
if (!report)
return;
// If no branches were found of branch coverage is not supported
if ((SymbolsToAnalyze->getNumberBranchesFound() == 0) ||
(BranchInfoAvailable == false) ) {
+
PutNoBranchInfo(report);
+
// If branches were found, ...
} else {
@@ -251,7 +259,7 @@
}
}
- CloseBranchFile( report );
+ CloseBranchFile( report, hasBranches );
}
/*
diff -u gcc-testing/rtems-coverage/ReportsHtml.h:1.2 gcc-testing/rtems-coverage/ReportsHtml.h:1.3
--- gcc-testing/rtems-coverage/ReportsHtml.h:1.2 Mon May 10 13:10:16 2010
+++ gcc-testing/rtems-coverage/ReportsHtml.h Tue May 11 16:21:25 2010
@@ -59,7 +59,8 @@
AnnotatedLineState_t lastState_m;
virtual FILE* OpenBranchFile(
- const char* const fileName
+ const char* const fileName,
+ bool hasBranches
);
virtual FILE* OpenCoverageFile(
@@ -75,7 +76,8 @@
);
virtual void CloseBranchFile(
- FILE* aFile
+ FILE* aFile,
+ bool hasBranches
);
virtual void CloseCoverageFile(
diff -u gcc-testing/rtems-coverage/ReportsHtml.cc:1.3 gcc-testing/rtems-coverage/ReportsHtml.cc:1.4
--- gcc-testing/rtems-coverage/ReportsHtml.cc:1.3 Mon May 10 14:08:36 2010
+++ gcc-testing/rtems-coverage/ReportsHtml.cc Tue May 11 16:21:25 2010
@@ -55,7 +55,8 @@
}
FILE* ReportsHtml::OpenBranchFile(
- const char* const fileName
+ const char* const fileName,
+ bool hasBranches
)
{
FILE *aFile;
@@ -63,29 +64,31 @@
// Open the file
aFile = OpenFile(fileName);
- // Put header information into the file
- fprintf( aFile, "<table class=\"covoar-table\">\n");
- fprintf( aFile, "<tbody class=\"covoar-tbody\">\n");
- fprintf( aFile, "<tr class=\"covoar-tr covoar-tr-first\">\n");
- fprintf( aFile, "<th class=\"covoar-th\">Index</th>\n");
- fprintf( aFile, "<th class=\"covoar-th\">Symbol</th>\n");
- fprintf( aFile, "<th class=\"covoar-th\">Line</th>\n");
- fprintf( aFile, "<th class=\"covoar-th\">Size</th>\n");
- fprintf( aFile, "<th class=\"covoar-th\">Size</th>\n");
- fprintf( aFile, "<th class=\"covoar-th\">Reason</th>\n");
- fprintf( aFile, "<th class=\"covoar-th\">Classification</th>\n");
- fprintf( aFile, "<th class=\"covoar-th\">Explanation</th>\n");
- fprintf( aFile, "</tr>\n");
-
- fprintf( aFile, "<tr class=\"covoar-tr covoar-tr-first\">\n");
- fprintf( aFile, "<th class=\"covoar-th\"></th>\n");
- fprintf( aFile, "<th class=\"covoar-th\"></th>\n");
- fprintf( aFile, "<th class=\"covoar-th\">Bytes</th>\n");
- fprintf( aFile, "<th class=\"covoar-th\">Instructions</th>\n");
- fprintf( aFile, "<th class=\"covoar-th\"></th>\n");
- fprintf( aFile, "<th class=\"covoar-th\"></th>\n");
- fprintf( aFile, "<th class=\"covoar-th\"></th>\n");
- fprintf( aFile, "</tr>\n");
+ if ( hasBranches ) {
+ // Put header information into the file
+ fprintf( aFile, "<table class=\"covoar-table\">\n");
+ fprintf( aFile, "<tbody class=\"covoar-tbody\">\n");
+ fprintf( aFile, "<tr class=\"covoar-tr covoar-tr-first\">\n");
+ fprintf( aFile, "<th class=\"covoar-th\">Index</th>\n");
+ fprintf( aFile, "<th class=\"covoar-th\">Symbol</th>\n");
+ fprintf( aFile, "<th class=\"covoar-th\">Line</th>\n");
+ fprintf( aFile, "<th class=\"covoar-th\">Size</th>\n");
+ fprintf( aFile, "<th class=\"covoar-th\">Size</th>\n");
+ fprintf( aFile, "<th class=\"covoar-th\">Reason</th>\n");
+ fprintf( aFile, "<th class=\"covoar-th\">Classification</th>\n");
+ fprintf( aFile, "<th class=\"covoar-th\">Explanation</th>\n");
+ fprintf( aFile, "</tr>\n");
+
+ fprintf( aFile, "<tr class=\"covoar-tr covoar-tr-first\">\n");
+ fprintf( aFile, "<th class=\"covoar-th\"></th>\n");
+ fprintf( aFile, "<th class=\"covoar-th\"></th>\n");
+ fprintf( aFile, "<th class=\"covoar-th\">Bytes</th>\n");
+ fprintf( aFile, "<th class=\"covoar-th\">Instructions</th>\n");
+ fprintf( aFile, "<th class=\"covoar-th\"></th>\n");
+ fprintf( aFile, "<th class=\"covoar-th\"></th>\n");
+ fprintf( aFile, "<th class=\"covoar-th\"></th>\n");
+ fprintf( aFile, "</tr>\n");
+ }
return aFile;
}
@@ -99,7 +102,6 @@
// Open the file
aFile = OpenFile(fileName);
-
// Put header information into the file
fprintf( aFile, "<table class=\"covoar-table\">\n");
fprintf( aFile, "<tbody class=\"covoar-tbody\">\n");
@@ -125,7 +127,6 @@
// Open the file
aFile = OpenFile(fileName);
-
// Put header information into the file
fprintf( aFile, "<table class=\"covoar-table\">\n");
fprintf( aFile, "<tbody class=\"covoar-tbody\">\n");
@@ -135,8 +136,6 @@
fprintf( aFile, "<th class=\"covoar-th\">File</th>\n");
fprintf( aFile, "</tr>\n");
-
-
return aFile;
}
@@ -209,11 +208,13 @@
FILE* report
)
{
- fprintf( report, "No branch information found\n" );
+ if ( BranchInfoAvailable )
+ fprintf( report, "All branch paths taken.\n" );
+ else
+ fprintf( report, "No branch information found.\n" );
return true;
}
-
bool ReportsHtml::PutBranchEntry(
FILE* report,
unsigned int count,
@@ -523,11 +524,14 @@
}
void ReportsHtml::CloseBranchFile(
- FILE* aFile
+ FILE* aFile,
+ bool hasBranches
)
{
- fprintf( aFile, "</tbody>\n" );
- fprintf( aFile, "</table>\n" );
+ if ( hasBranches ) {
+ fprintf( aFile, "</tbody>\n" );
+ fprintf( aFile, "</table>\n" );
+ }
fprintf( aFile, "</pre>\n" );
fprintf( aFile, "</body>\n");
fprintf( aFile, "</html>");
diff -u gcc-testing/rtems-coverage/ReportsText.cc:1.3 gcc-testing/rtems-coverage/ReportsText.cc:1.4
--- gcc-testing/rtems-coverage/ReportsText.cc:1.3 Mon May 10 13:10:16 2010
+++ gcc-testing/rtems-coverage/ReportsText.cc Tue May 11 16:21:25 2010
@@ -35,7 +35,10 @@
FILE* report
)
{
- fprintf( report, "No branch information found\n" );
+ if ( BranchInfoAvailable )
+ fprintf( report, "All branch paths taken.\n" );
+ else
+ fprintf( report, "No branch information found.\n" );
return true;
}
--
Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20100511/83982913/attachment-0001.html>
More information about the vc
mailing list