Index: tester/covoar/ExecutableInfo.cc
===================================================================
--- tester/covoar/ExecutableInfo.cc	(revision 3e187baeb9f706b729b2760a51e63a7703a30679)
+++ tester/covoar/ExecutableInfo.cc	(revision fb987e82be3e3d025875b6c39c92384c3e8a1c3e)
@@ -7,4 +7,6 @@
 
 #include <stdio.h>
+
+#include <rld.h>
 
 #include "ExecutableInfo.h"
@@ -19,22 +21,34 @@
     const char* const theExecutableName,
     const char* const theLibraryName
-  )
+    ) : executable(theExecutableName),
+        loadAddress(0)
   {
-    executableName = theExecutableName;
-    loadAddress = 0;
-    libraryName = "";
     if (theLibraryName)
       libraryName = theLibraryName;
-    theSymbolTable = new SymbolTable();
+    try {
+      executable.open();
+      executable.begin();
+      executable.load_symbols(symbols);
+      debug.begin(executable.elf());
+      debug.load_debug();
+    } catch (rld::error re) {
+      std::cerr << "error: "
+                << re.where << ": " << re.what
+                << std::endl;
+      exit(2);
+    } catch (...) {
+      exit(2);
+    }
   }
 
   ExecutableInfo::~ExecutableInfo()
   {
-    if (theSymbolTable)
-      delete theSymbolTable;
+    debug.end();
+    executable.end();
+    executable.close();
   }
 
   void ExecutableInfo::dumpCoverageMaps( void ) {
-    ExecutableInfo::coverageMaps_t::iterator  itr;
+    ExecutableInfo::CoverageMaps::iterator  itr;
 
     for (itr = coverageMaps.begin(); itr != coverageMaps.end(); itr++) {
@@ -45,19 +59,20 @@
 
   void ExecutableInfo::dumpExecutableInfo( void ){
-    fprintf( stdout, "\n== Executable info ==\n");
-    fprintf( stdout, "executableName = %s\n", executableName.c_str());
-    fprintf( stdout, "libraryName = %s\n", libraryName.c_str());
-    fprintf( stdout, "loadAddress = %u\n", loadAddress);
-    theSymbolTable->dumpSymbolTable();
+    std::cout << std::endl
+              << "== Executable info ==" << std::endl
+              << "executable = " << getFileName () << std::endl
+              << "library = " << libraryName << std::endl
+              << "loadAddress = " << loadAddress << std::endl;
+    theSymbolTable.dumpSymbolTable();
   }
 
   CoverageMapBase* ExecutableInfo::getCoverageMap ( uint32_t address )
   {
-    CoverageMapBase*         aCoverageMap = NULL;
-    coverageMaps_t::iterator it;
-    std::string              itsSymbol;
+    CoverageMapBase*       aCoverageMap = NULL;
+    CoverageMaps::iterator it;
+    std::string            itsSymbol;
 
     // Obtain the coverage map containing the specified address.
-    itsSymbol = theSymbolTable->getSymbol( address );
+    itsSymbol = theSymbolTable.getSymbol( address );
     if (itsSymbol != "") {
       it = coverageMaps.find( itsSymbol );
@@ -68,10 +83,10 @@
   }
 
-  const std::string& ExecutableInfo::getFileName ( void ) const
+  const std::string ExecutableInfo::getFileName ( void ) const
   {
-    return executableName;
+    return executable.name().full();
   }
 
-  const std::string& ExecutableInfo::getLibraryName( void ) const
+  const std::string ExecutableInfo::getLibraryName( void ) const
   {
     return libraryName;
@@ -84,7 +99,7 @@
 
 
-  SymbolTable* ExecutableInfo::getSymbolTable ( void ) const
+  SymbolTable* ExecutableInfo::getSymbolTable ( void )
   {
-    return theSymbolTable;
+    return &theSymbolTable;
   }
 
@@ -96,6 +111,6 @@
   )
   {
-    CoverageMapBase                          *theMap;
-    ExecutableInfo::coverageMaps_t::iterator  itr;
+    CoverageMapBase                        *theMap;
+    ExecutableInfo::CoverageMaps::iterator  itr;
 
     itr = coverageMaps.find( symbolName );
@@ -110,11 +125,24 @@
   }
 
+  void ExecutableInfo::getSourceAndLine(
+    const unsigned int address,
+    std::string&       line
+  )
+  {
+    std::string file;
+    int         lno;
+    debug.get_source (address, file, lno);
+    std::ostringstream ss;
+    ss << file << ':' << lno;
+    line = ss.str ();
+  }
+
   bool ExecutableInfo::hasDynamicLibrary( void )
   {
-     return (libraryName != "");
+    return !libraryName.empty();
   }
 
   void ExecutableInfo::mergeCoverage( void ) {
-    ExecutableInfo::coverageMaps_t::iterator  itr;
+    ExecutableInfo::CoverageMaps::iterator  itr;
 
     for (itr = coverageMaps.begin(); itr != coverageMaps.end(); itr++) {
