Small patch to fix covoar to work with TSIM coverage files. It should be noted 
that covoar erroneously marks some code as uncovered while it is marked as 
covered in the coverage file. This seems to be due to incorrect parsing of the 
symbol table in the exec file. I will file a ticket for this on trac ..


>From ec0a006871e9b616212d7a4586973715d9e724b5 Mon Sep 17 00:00:00 2001
From: Jiri Gaisler <j...@gaisler.se>
Date: Thu, 24 Jan 2019 09:44:48 +0100
Subject: [PATCH] covoar: -f switch was not used to select coverage format

	* Also fix debug printout of hex addresses
---
 tester/covoar/DesiredSymbols.cc | 1 +
 tester/covoar/covoar.cc         | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/tester/covoar/DesiredSymbols.cc b/tester/covoar/DesiredSymbols.cc
index 7def2ce..b9a5bb7 100644
--- a/tester/covoar/DesiredSymbols.cc
+++ b/tester/covoar/DesiredSymbols.cc
@@ -296,6 +296,7 @@ namespace Coverage {
                 );
               if (Verbose)
                 std::cerr << "Branch never taken found in " << s.first
+                          << std::hex
                           << " (0x" << s.second.baseAddress + la
                           << " - 0x" << s.second.baseAddress + ha
                           << ")"
diff --git a/tester/covoar/covoar.cc b/tester/covoar/covoar.cc
index 36c24c3..cbb0e4f 100644
--- a/tester/covoar/covoar.cc
+++ b/tester/covoar/covoar.cc
@@ -163,7 +163,7 @@ int covoar(
   char                          gcdaFileName[FILE_NAME_LENGTH];
   char                          gcovBashCommand[256];
   std::string                   target;
-  const char*                   format = "html";
+  const char*                   format = "QEMU";
   FILE*                         gcnosFile = NULL;
   Gcov::GcovData*               gcovFile;
   const char*                   singleExecutable = NULL;
@@ -359,6 +359,7 @@ int covoar(
     AllExplanations->load( explanations );
 
   // Create coverage map reader.
+  coverageFormat = Coverage::CoverageFormatToEnum(format);
   coverageReader = Coverage::CreateCoverageReader(coverageFormat);
   if (!coverageReader)
     throw rld::error( "Unable to create coverage file reader", "covoar" );
-- 
2.17.1

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to