Index: tester/covoar/CoverageMapBase.cc
===================================================================
--- tester/covoar/CoverageMapBase.cc	(revision f450227669787627547c0da120400eda2fc92e08)
+++ tester/covoar/CoverageMapBase.cc	(revision 99c90b3353bf5b638dcfd87803e4aaf02adf3219)
@@ -12,7 +12,93 @@
 #include <iomanip>
 
+#include <rld.h>
+
 #include "CoverageMapBase.h"
 
 namespace Coverage {
+
+  AddressInfo::AddressInfo ()
+    : isStartOfInstruction (false),
+      wasExecuted (false),
+      isBranch (false),
+      isNop (false),
+      wasTaken (false),
+      wasNotTaken (false)
+  {
+  }
+
+  AddressRange::AddressRange ()
+    : lowAddress(0),
+      highAddress(0)
+  {
+  }
+
+  AddressRange::AddressRange (const std::string& name,
+                              uint32_t           lowAddress,
+                              uint32_t           highAddress)
+    : fileName (name),
+      lowAddress (lowAddress),
+      highAddress (highAddress)
+  {
+    info.resize( size( ) );
+  }
+
+  size_t AddressRange::size () const
+  {
+    return highAddress - lowAddress + 1;
+  }
+
+  bool AddressRange::inside (uint32_t address) const
+  {
+    return address >= lowAddress && address <= highAddress;
+  }
+
+  AddressInfo& AddressRange::get (uint32_t address)
+  {
+    if ( !inside( address ) )
+      throw rld::error( "address outside range", "AddressRange::get" );
+    size_t slot = address - lowAddress;
+    if (slot >= info.size ())
+      throw rld::error( "address slot not found", "AddressRange::get" );
+    return info[slot];
+  }
+
+  const AddressInfo& AddressRange::get (uint32_t address) const
+  {
+    if ( !inside( address ) )
+      throw rld::error( "address outside range", "AddressRange::get" );
+    size_t slot = address - lowAddress;
+    if (slot >= info.size ())
+      throw rld::error( "address slot not found", "AddressRange::get" );
+    return info[slot];
+  }
+
+  void AddressRange::dump (std::ostream& out, bool show_slots) const
+  {
+    out << std::hex << std::setfill('0')
+        << "Address range: low = " << std::setw(8) << lowAddress
+        << " high = " << std::setw(8) << highAddress
+        << std::endl;
+    if (show_slots) {
+      size_t slot = 0;
+      for (auto& i : info) {
+        out << std::hex << std::setfill('0')
+            << "0x" << std::setw(8) << slot++ + lowAddress
+            << "- isStartOfInstruction:"
+            << (char*) (i.isStartOfInstruction ? "yes" : "no")
+            << " wasExecuted:"
+            << (char*) (i.wasExecuted ? "yes" : "no")
+            << std::endl
+            << "           isBranch:"
+            << (char*) (i.isBranch ? "yes" : "no")
+            << " wasTaken:"
+            << (char*) (i.wasTaken ? "yes" : "no")
+            << " wasNotTaken:"
+            << (char*) (i.wasNotTaken ? "yes" : "no")
+            << std::dec << std::setfill(' ')
+            << std::endl;
+      }
+    }
+  }
 
   CoverageMapBase::CoverageMapBase(
@@ -20,88 +106,39 @@
     uint32_t           low,
     uint32_t           high
-  )
-  {
-    uint32_t     a;
-    AddressRange range;
-
-    range.fileName    = exefileName;
-    range.lowAddress  = low;
-    range.highAddress = high;
-    Ranges.push_back( range );
-
-    Size = high - low + 1;
-
-    Info = new perAddressInfo[ Size ];
-
-    for (a = 0; a < Size; a++) {
-
-      perAddressInfo *i = &Info[ a ];
-
-      i->isStartOfInstruction = false;
-      i->wasExecuted          = 0;
-      i->isBranch             = false;
-      i->isNop                = false;
-      i->wasTaken             = 0;
-      i->wasNotTaken          = 0;
-    }
+    ) : exefileName (exefileName)
+  {
+    Ranges.push_back( AddressRange( exefileName, low, high ) );
   }
 
   CoverageMapBase::~CoverageMapBase()
   {
-    if (Info)
-      delete Info;
-  }
-
-  void  CoverageMapBase::Add( uint32_t low, uint32_t high )
-  {
-    AddressRange range;
-
-    range.lowAddress  = low;
-    range.highAddress = high;
-    Ranges.push_back( range );
-  }
-
-  bool CoverageMapBase::determineOffset(
-    uint32_t  address,
-    uint32_t *offset
-  )const
-  {
-    AddressRanges::const_iterator  itr;
-
-    for ( auto& r : Ranges ) {
-      if ((address >= r.lowAddress) && (address <= r.highAddress)){
-        *offset = address - r.lowAddress;
+  }
+
+  void CoverageMapBase::Add( uint32_t low, uint32_t high )
+  {
+    Ranges.push_back( AddressRange( exefileName, low, high ) );
+  }
+
+  bool CoverageMapBase::validAddress( const uint32_t address ) const
+  {
+    for ( auto r : Ranges )
+      if (r.inside( address ))
         return true;
-      }
-    }
-    *offset = 0;
     return false;
   }
 
-
   void CoverageMapBase::dump( void ) const
   {
-    fprintf( stderr, "Coverage Map Contents:\n" );
-    /*
-     * XXX - Dump is only marking the first Address Range.
-     */
-    for (uint32_t a = 0; a < Size; a++) {
-      perAddressInfo* entry = &Info[ a ];
-      std::cerr << std::hex << std::setfill('0')
-                << "0x" << a + Ranges.front().lowAddress
-                << "- isStartOfInstruction:"
-                << (char*) (entry->isStartOfInstruction ? "yes" : "no")
-                << " wasExecuted:"
-                << (char*) (entry->wasExecuted ? "yes" : "no")
-                << std::endl
-                << "           isBranch:"
-                << (char*) (entry->isBranch ? "yes" : "no")
-                << " wasTaken:"
-                << (char*) (entry->wasTaken ? "yes" : "no")
-                << " wasNotTaken:"
-                << (char*) (entry->wasNotTaken ? "yes" : "no")
-                << std::dec << std::setfill(' ')
-                << std::endl;
-    }
+    std::cerr << "Coverage Map Contents:" << std::endl;
+    for (auto& r : Ranges)
+      r.dump( std::cerr );
+  }
+
+  uint32_t CoverageMapBase::getSize() const
+  {
+    size_t size = 0;
+    for (auto& r : Ranges)
+      size += r.size ();
+    return size;
   }
 
@@ -115,6 +152,5 @@
     AddressRange range;
 
-
-    status = getRange( address, &range );
+    status = getRange( address, range );
     if ( status != true )
       return status;
@@ -123,5 +159,5 @@
 
     while (start >= range.lowAddress ) {
-      if (Info[ start - range.lowAddress ].isStartOfInstruction) {
+      if (isStartOfInstruction( start - range.lowAddress )) {
         *beginning = start;
         status = true;
@@ -137,27 +173,37 @@
   int32_t CoverageMapBase::getFirstLowAddress() const
   {
+    /*
+     * This is broken, do not trust it.
+     */
     return Ranges.front().lowAddress;
   }
 
-  bool CoverageMapBase::getRange( uint32_t address, AddressRange *range ) const
+  bool CoverageMapBase::getRange( uint32_t address, AddressRange& range ) const
   {
     for ( auto r : Ranges ) {
-      if ((address >= r.lowAddress) && (address <= r.highAddress)){
-        range->lowAddress = r.lowAddress;
-        range->highAddress = r.highAddress;
+      if (r.inside( address )) {
+        range.lowAddress = r.lowAddress;
+        range.highAddress = r.highAddress;
+        range.info = r.info;
         return true;
       }
     }
-
-    range->lowAddress  = 0;
-    range->highAddress = 0;
-
     return false;
-
-  }
-
-  uint32_t CoverageMapBase::getSize() const
-  {
-    return Size;
+  }
+
+  AddressInfo& CoverageMapBase::getInfo( uint32_t address )
+  {
+    for ( auto& r : Ranges )
+      if (r.inside( address ))
+        return r.get( address );
+    throw rld::error( "address out of bounds", "CoverageMapBase::getInfo" );
+  }
+
+  const AddressInfo& CoverageMapBase::getInfo( uint32_t address ) const
+  {
+    for ( auto& r : Ranges )
+      if (r.inside( address ))
+        return r.get( address );
+    throw rld::error( "address out of bounds", "CoverageMapBase::getInfo" );
   }
 
@@ -166,228 +212,152 @@
   )
   {
-    uint32_t offset;
-
-    if (determineOffset( address, &offset ) != true)
+    if ( validAddress( address ) )
+      getInfo( address ).isStartOfInstruction = true;
+  }
+
+  bool CoverageMapBase::isStartOfInstruction( uint32_t address ) const
+  {
+    if ( !validAddress( address ) )
+      return false;
+    return getInfo( address ).isStartOfInstruction;
+  }
+
+  void CoverageMapBase::setWasExecuted( uint32_t address )
+  {
+    if ( validAddress( address ) )
+      getInfo( address ).wasExecuted += 1;
+  }
+
+  void CoverageMapBase::sumWasExecuted( uint32_t address, uint32_t addition)
+  {
+    if ( validAddress( address ) )
+      getInfo( address ).wasExecuted += addition;
+  }
+
+  bool CoverageMapBase::wasExecuted( uint32_t address ) const
+  {
+    bool result = false;
+    if ( validAddress( address ) && (getInfo( address ).wasExecuted > 0))
+      result = true;
+    return result;
+  }
+
+  uint32_t CoverageMapBase::getWasExecuted( uint32_t address ) const
+  {
+    if ( !validAddress( address ) )
+      return 0;
+    return getInfo( address ).wasExecuted;
+  }
+
+  void CoverageMapBase::setIsBranch(
+    uint32_t    address
+  )
+  {
+    if ( validAddress( address ) )
+      getInfo( address ).isBranch = true;
+  }
+
+  bool CoverageMapBase::isNop( uint32_t address ) const
+  {
+    if ( !validAddress( address ) )
+      return false;
+    return getInfo( address ).isNop;
+  }
+
+  void CoverageMapBase::setIsNop(
+    uint32_t    address
+  )
+  {
+    if ( !validAddress( address ) )
       return;
-
-    Info[ offset ].isStartOfInstruction = true;
-  }
-
-  bool CoverageMapBase::isStartOfInstruction( uint32_t address ) const
-  {
-    uint32_t offset;
-
-    if (determineOffset( address, &offset ) != true)
-      return false;
-
-    return Info[ offset ].isStartOfInstruction;
-  }
-
-  void CoverageMapBase::setWasExecuted( uint32_t address )
-  {
-    uint32_t offset;
-
-    if (determineOffset( address, &offset ) != true)
+    getInfo( address ).isNop = true;
+  }
+
+  bool CoverageMapBase::isBranch( uint32_t address ) const
+  {
+    if ( !validAddress( address ) )
+      return false;
+    return getInfo( address ).isBranch;
+  }
+
+  void CoverageMapBase::setWasTaken(
+    uint32_t    address
+  )
+  {
+    if ( !validAddress( address ) )
       return;
-
-    Info[ offset ].wasExecuted += 1;
-  }
-
-  void CoverageMapBase::sumWasExecuted( uint32_t address, uint32_t addition)
-  {
-    uint32_t offset;
-
-    if (determineOffset( address, &offset ) != true)
+    getInfo( address ).wasTaken += 1;
+  }
+
+  void CoverageMapBase::setWasNotTaken(
+    uint32_t    address
+  )
+  {
+    if ( !validAddress( address ) )
       return;
-
-    Info[ offset ].wasExecuted += addition;
-  }
-
-  bool CoverageMapBase::wasExecuted( uint32_t address ) const
-  {
-    uint32_t offset;
-    bool     result;
-
-    result = true;
-
-    if (determineOffset( address, &offset ) != true)
+    getInfo( address ).wasNotTaken += 1;
+  }
+
+  bool CoverageMapBase::wasAlwaysTaken( uint32_t address ) const
+  {
+    if ( !validAddress( address ) )
+      return false;
+    const AddressInfo& info = getInfo( address );
+    return info.wasTaken && !info.wasNotTaken;
+  }
+
+  bool CoverageMapBase::wasNeverTaken( uint32_t address ) const
+  {
+    if ( !validAddress( address ) )
+      return false;
+    const AddressInfo& info = getInfo( address );
+    return !info.wasTaken && info.wasNotTaken;
+  }
+
+  bool CoverageMapBase::wasNotTaken( uint32_t address ) const
+  {
+    bool result = true;
+    if ( !validAddress( address ) )
       result = false;
-
-    if (Info[ offset ].wasExecuted <= 0)
+    else if ( getInfo( address ).wasNotTaken <= 0 )
       result = false;
-
     return result;
   }
 
-  uint32_t CoverageMapBase::getWasExecuted( uint32_t address ) const
-  {
-    uint32_t offset;
-
-    if (determineOffset( address, &offset ) != true)
+  void CoverageMapBase::sumWasNotTaken( uint32_t address, uint32_t addition)
+  {
+    if ( validAddress( address ) )
+      getInfo( address ).wasNotTaken += addition;
+  }
+
+  uint32_t CoverageMapBase::getWasNotTaken( uint32_t address ) const
+  {
+    if ( !validAddress( address ) )
       return 0;
-
-    return Info[ offset ].wasExecuted;
-  }
-
-  void CoverageMapBase::setIsBranch(
-    uint32_t    address
-  )
-  {
-    uint32_t offset;
-
-    if (determineOffset( address, &offset ) != true)
+    return getInfo( address ).wasNotTaken;
+  }
+
+  bool CoverageMapBase::wasTaken( uint32_t address ) const
+  {
+    bool result = true;
+    if ( !validAddress( address ) )
+      result = false;
+    else if ( getInfo( address ).wasTaken <= 0 )
+      result = false;
+    return result;
+  }
+
+  void CoverageMapBase::sumWasTaken( uint32_t address, uint32_t addition)
+  {
+    if ( !validAddress( address ) )
       return;
-
-    Info[ offset ].isBranch = true;
-  }
-
-  bool CoverageMapBase::isNop( uint32_t address ) const
-  {
-    uint32_t offset;
-
-    if (determineOffset( address, &offset ) != true)
-      return false;
-
-    return Info[ offset ].isNop;
-  }
-
-  void CoverageMapBase::setIsNop(
-    uint32_t    address
-  )
-  {
-    uint32_t offset;
-
-    if (determineOffset( address, &offset ) != true)
-      return;
-
-    Info[ offset ].isNop = true;
-  }
-
-  bool CoverageMapBase::isBranch( uint32_t address ) const
-  {
-    uint32_t offset;
-
-    if (determineOffset( address, &offset ) != true)
-      return false;
-
-    return Info[ offset ].isBranch;
-  }
-
-  void CoverageMapBase::setWasTaken(
-    uint32_t    address
-  )
-  {
-    uint32_t offset;
-
-    if (determineOffset( address, &offset ) != true)
-      return;
-
-    Info[ offset ].wasTaken += 1;
-  }
-
-  void CoverageMapBase::setWasNotTaken(
-    uint32_t    address
-  )
-  {
-    uint32_t offset;
-
-    if (determineOffset( address, &offset ) != true)
-      return;
-
-    Info[ offset ].wasNotTaken += 1;
-  }
-
-  bool CoverageMapBase::wasAlwaysTaken( uint32_t address ) const
-  {
-    uint32_t offset;
-
-    if (determineOffset( address, &offset ) != true)
-      return false;
-
-    return (Info[ offset ].wasTaken &&
-            !Info[ offset ].wasNotTaken);
-  }
-
-  bool CoverageMapBase::wasNeverTaken( uint32_t address ) const
-  {
-    uint32_t offset;
-
-    if (determineOffset( address, &offset ) != true)
-      return false;
-
-    return (!Info[ offset ].wasTaken &&
-            Info[ offset ].wasNotTaken);
-  }
-
-  bool CoverageMapBase::wasNotTaken( uint32_t address ) const
-  {
-	    uint32_t offset;
-	    bool     result;
-
-	    result = true;
-
-	    if (determineOffset( address, &offset ) != true)
-	      result = false;
-
-	    if (Info[ offset ].wasNotTaken <= 0)
-	      result = false;
-
-	    return result;
-  }
-
-  void CoverageMapBase::sumWasNotTaken( uint32_t address, uint32_t addition)
-  {
-    uint32_t offset;
-
-    if (determineOffset( address, &offset ) != true)
-      return;
-
-    Info[ offset ].wasNotTaken += addition;
-  }
-
-  uint32_t CoverageMapBase::getWasNotTaken( uint32_t address ) const
-  {
-    uint32_t offset;
-
-    if (determineOffset( address, &offset ) != true)
+    getInfo( address ).wasTaken += addition;
+  }
+
+  uint32_t CoverageMapBase::getWasTaken( uint32_t address ) const
+  {
+    if ( !validAddress( address ) )
       return 0;
-
-    return Info[ offset ].wasNotTaken;
-  }
-
-  bool CoverageMapBase::wasTaken( uint32_t address ) const
-  {
-    uint32_t offset;
-    bool     result;
-
-    result = true;
-
-    if (determineOffset( address, &offset ) != true)
-      result = false;
-
-    if (Info[ offset ].wasTaken <= 0)
-      result = false;
-
-    return result;
-  }
-
-  void CoverageMapBase::sumWasTaken( uint32_t address, uint32_t addition)
-  {
-    uint32_t offset;
-
-    if (determineOffset( address, &offset ) != true)
-      return;
-
-    Info[ offset ].wasTaken += addition;
-  }
-
-  uint32_t CoverageMapBase::getWasTaken( uint32_t address ) const
-  {
-    uint32_t offset;
-
-    if (determineOffset( address, &offset ) != true)
-      return 0;
-
-    return Info[ offset ].wasTaken;
+    return getInfo( address ).wasTaken;
   }
 }
Index: tester/covoar/CoverageMapBase.h
===================================================================
--- tester/covoar/CoverageMapBase.h	(revision f450227669787627547c0da120400eda2fc92e08)
+++ tester/covoar/CoverageMapBase.h	(revision 99c90b3353bf5b638dcfd87803e4aaf02adf3219)
@@ -10,7 +10,96 @@
 #include <stdint.h>
 #include <string>
+#include <vector>
 #include <list>
 
 namespace Coverage {
+
+  /*!
+   *  This structure defines the information that is gathered and
+   *  tracked per address.
+   */
+  struct AddressInfo {
+
+    AddressInfo ();
+
+    /*!
+     *  This member indicates that the address is the start of
+     *  an instruction.
+     */
+    bool isStartOfInstruction;
+    /*!
+     *  This member indicates how many times the address was executed.
+     */
+    uint32_t wasExecuted;
+    /*!
+     *  This member indicates that the address is a branch instruction.
+     */
+    bool isBranch;
+    /*!
+     *  This member indicates that the address is a NOP instruction.
+     */
+    bool isNop;
+    /*!
+     *  When isBranch is TRUE, this member indicates that the branch
+     *  instruction at the address was taken.
+     */
+    uint32_t wasTaken;
+    /*!
+     *  When isBranch is TRUE, this member indicates that the branch
+     *  instruction at the address was NOT taken.
+     */
+    uint32_t wasNotTaken;
+
+  };
+
+  typedef std::vector < AddressInfo > AddressInfos;
+
+  /*!
+   *  This structure identifies the low and high addresses
+   *  of one range.  Note:: There may be more than one address
+   *  range per symbol.
+   */
+  struct AddressRange {
+
+    AddressRange ();
+    AddressRange (const std::string& name,
+                  uint32_t           lowAddress,
+                  uint32_t           highAddress);
+
+    size_t size () const;
+
+    bool inside (uint32_t address) const;
+
+    AddressInfo& get (uint32_t address);
+    const AddressInfo& get (uint32_t address) const;
+
+    void dump (std::ostream& out, bool show_slots = false) const;
+
+    /*!
+     *  This is the file from which this originated.
+     */
+    std::string fileName;
+
+    /*!
+     *  This is the low address of the address map range.
+     */
+    uint32_t lowAddress;
+
+    /*!
+     *  This is the high address of the address map range.
+     */
+    uint32_t highAddress;
+
+    /*!
+     *  The address info for this range.
+     */
+    AddressInfos info;
+
+  };
+
+  /*
+   *  This type identifies a list of ranges.
+   */
+  typedef std::vector< AddressRange >  AddressRanges;
 
   /*! @class CoverageMapBase
@@ -23,32 +112,4 @@
 
     /*!
-     *  This structure identifies the low and high addresses
-     *  of one range.  Note:: There may be more than one address
-     *  range per symbol.
-     */
-    struct AddressRange {
-      /*!
-       *  This is the file from which this originated.
-       */
-      std::string fileName;
-
-      /*!
-       *  This is the low address of the address map range.
-       */
-      uint32_t lowAddress;
-
-      /*!
-       *  This is the high address of the address map range.
-       */
-      uint32_t highAddress;
-
-    };
-
-    /*
-     *  This type identifies a list of ranges.
-     */
-    typedef std::list< AddressRange >  AddressRanges;
-
-    /*!
      *  This method constructs a CoverageMapBase instance.
      *
@@ -78,21 +139,12 @@
 
     /*!
-     *  This method returns true and sets the offset if
-     *  the address falls with the bounds of an address range
-     *  in the RangeList.
-     *
-     *  @param[in]  address specifies the address to find
-     *  @param[out] offset contains the offset from the low
-     *              address of the address range.
-     *
-     *  @return Returns TRUE if the address range can be found
-     *   and FALSE if it was not.
-      */
-    bool determineOffset( uint32_t address, uint32_t *offset ) const;
-
-    /*!
      *  This method prints the contents of the coverage map to stdout.
      */
     void dump( void ) const;
+
+    /*!
+     *  Address valid?
+     */
+    bool validAddress( const uint32_t address ) const;
 
     /*!
@@ -117,5 +169,5 @@
      *   and FALSE if it was not.
      */
-    bool getRange( uint32_t address, AddressRange *range ) const;
+    bool getRange( uint32_t address, AddressRange& range ) const;
 
     /*!
@@ -125,5 +177,4 @@
      */
     uint32_t getSize() const;
-
 
     /*!
@@ -359,39 +410,10 @@
     bool wasTaken( uint32_t address ) const;
 
-  protected:
-
-    /*!
-     *  This structure defines the information that is gathered and
-     *  tracked per address.
-     */
-    struct perAddressInfo {
-      /*!
-       *  This member indicates that the address is the start of
-       *  an instruction.
-       */
-      bool isStartOfInstruction;
-      /*!
-       *  This member indicates how many times the address was executed.
-       */
-      uint32_t wasExecuted;
-      /*!
-       *  This member indicates that the address is a branch instruction.
-       */
-      bool isBranch;
-      /*!
-       *  This member indicates that the address is a NOP instruction.
-       */
-      bool isNop;
-      /*!
-       *  When isBranch is TRUE, this member indicates that the branch
-       *  instruction at the address was taken.
-       */
-      uint32_t wasTaken;
-      /*!
-       *  When isBranch is TRUE, this member indicates that the branch
-       *  instruction at the address was NOT taken.
-       */
-      uint32_t wasNotTaken;
-    };
+  private:
+
+    /*!
+     * The executable file name.
+     */
+    std::string exefileName;
 
     /*!
@@ -402,14 +424,13 @@
 
     /*!
-     *
-     *  This variable contains the size of the code block.
-     */
-    uint32_t Size;
-
-    /*!
-     *  This is a dynamically allocated array of data that is
-     *  kept for each address.
-     */
-    perAddressInfo* Info;
+     * Range checked access to the info.
+     */
+    AddressInfo& getInfo(uint32_t offset);
+
+    /*!
+     * Constant range checked access to the info.
+     */
+    const AddressInfo& getInfo(uint32_t offset) const;
+
   };
 
Index: tester/covoar/DesiredSymbols.cc
===================================================================
--- tester/covoar/DesiredSymbols.cc	(revision f450227669787627547c0da120400eda2fc92e08)
+++ tester/covoar/DesiredSymbols.cc	(revision 99c90b3353bf5b638dcfd87803e4aaf02adf3219)
@@ -97,9 +97,11 @@
       for (auto& kv : symbols.globals()) {
         const rld::symbols::symbol& sym = *(kv.second);
-        set[sym.name()] = *(new SymbolInformation);
+        if (sym.type() == sym.st_func)
+          set[sym.name()] = *(new SymbolInformation);
       }
       for (auto& kv : symbols.weaks()) {
         const rld::symbols::symbol& sym = *(kv.second);
-        set[sym.name()] = *(new SymbolInformation);
+        if (sym.type() == sym.st_func)
+          set[sym.name()] = *(new SymbolInformation);
       }
     } catch (...) {
@@ -346,7 +348,8 @@
                   << symbolName
                   << " with different sizes ("
-                  << exefileName << '/' << itr->second.stats.sizeInBytes
-                  << "!= "
-                  << itr->second.sourceFile->getFileName() << '/' << size << ')'
+                  << rld::path::basename(exefileName) << '/' << itr->second.stats.sizeInBytes
+                  << " != "
+                  << rld::path::basename(itr->second.sourceFile->getFileName())
+                  << '/' << size << ')'
                   << std::endl;
 
@@ -451,12 +454,5 @@
   ) const
   {
-    if (set.find( symbolName ) == set.end()) {
-      #if 0
-        std::cerr << "Warning: Unable to find symbol " << symbolName
-                  << std::endl;
-      #endif
-      return false;
-    }
-    return true;
+    return set.find( symbolName ) == set.end() ? false : true;
   }
 
@@ -477,15 +473,18 @@
     }
 
+    SymbolInformation& sinfo = itr->second;
+
     // Ensure that the source and destination coverage maps
     // are the same size.
     // Changed from ERROR msg to INFO, because size mismatch is not
     // treated as error anymore. 2015-07-20
-    uint32_t dMapSize = itr->second.stats.sizeInBytes;
+    uint32_t dMapSize = sinfo.stats.sizeInBytes;
     uint32_t sBaseAddress = sourceCoverageMap->getFirstLowAddress();
     uint32_t sMapSize = sourceCoverageMap->getSize();
-    if (dMapSize != sMapSize) {
+    if (dMapSize != 0 && dMapSize != sMapSize) {
       std::cerr << "INFO: DesiredSymbols::mergeCoverageMap - Unable to merge "
                 << "coverage map for " << symbolName
-                << " because the sizes are different"
+                << " because the sizes are different ("
+                << "size: " << dMapSize << ", source: " << sMapSize << ')'
                 << std::endl;
       return;
@@ -493,5 +492,5 @@
 
     // Merge the data for each address.
-    CoverageMapBase* destinationCoverageMap = itr->second.unifiedCoverageMap;
+    CoverageMapBase* destinationCoverageMap = sinfo.unifiedCoverageMap;
 
     for (uint32_t dAddress = 0; dAddress < dMapSize; dAddress++) {
Index: tester/covoar/ExecutableInfo.cc
===================================================================
--- tester/covoar/ExecutableInfo.cc	(revision f450227669787627547c0da120400eda2fc92e08)
+++ tester/covoar/ExecutableInfo.cc	(revision 99c90b3353bf5b638dcfd87803e4aaf02adf3219)
@@ -20,10 +20,18 @@
   ExecutableInfo::ExecutableInfo(
     const char* const theExecutableName,
-    const char* const theLibraryName
+    const char* const theLibraryName,
+    bool              verbose
     ) : executable(theExecutableName),
         loadAddress(0)
   {
-    if (theLibraryName)
+    if (theLibraryName != nullptr)
       libraryName = theLibraryName;
+
+    if (verbose) {
+      std::cerr << "Loading executable " << theExecutableName;
+      if (theLibraryName != nullptr)
+        std::cerr << " (" << theLibraryName << ')';
+      std::cerr << std::endl;
+    }
 
     executable.open();
@@ -33,4 +41,13 @@
     debug.load_debug();
     debug.load_functions();
+
+    for (auto& cu : debug.get_cus()) {
+      for (auto& func : cu.get_functions()) {
+        if (func.has_machine_code() && (!func.is_inlined() || func.is_external())) {
+          createCoverageMap (cu.name(), func.name(),
+                             func.pc_low(), func.pc_high());
+        }
+      }
+    }
   }
 
@@ -96,5 +113,15 @@
   }
 
-  CoverageMapBase* ExecutableInfo::createCoverageMap (
+  CoverageMapBase& ExecutableInfo::findCoverageMap(
+    const std::string& symbolName
+  )
+  {
+    CoverageMaps::iterator cmi = coverageMaps.find( symbolName );
+    if ( cmi == coverageMaps.end() )
+      throw rld::error (symbolName, "ExecutableInfo::findCoverageMap");
+    return *(cmi->second);
+  }
+
+  void ExecutableInfo::createCoverageMap (
     const std::string& fileName,
     const std::string& symbolName,
@@ -114,5 +141,4 @@
       theMap->Add( lowAddress, highAddress );
     }
-    return theMap;
   }
 
@@ -136,8 +162,7 @@
 
   void ExecutableInfo::mergeCoverage( void ) {
-    ExecutableInfo::CoverageMaps::iterator  itr;
-
-    for (itr = coverageMaps.begin(); itr != coverageMaps.end(); itr++) {
-      SymbolsToAnalyze->mergeCoverageMap( (*itr).first, (*itr).second );
+    for (auto& cm : coverageMaps) {
+      if (SymbolsToAnalyze->isDesired( cm.first ))
+        SymbolsToAnalyze->mergeCoverageMap( cm.first, cm.second );
     }
   }
Index: tester/covoar/ExecutableInfo.h
===================================================================
--- tester/covoar/ExecutableInfo.h	(revision f450227669787627547c0da120400eda2fc92e08)
+++ tester/covoar/ExecutableInfo.h	(revision 99c90b3353bf5b638dcfd87803e4aaf02adf3219)
@@ -38,5 +38,6 @@
     ExecutableInfo(
       const char* const theExecutableName,
-      const char* const theLibraryName = NULL
+      const char* const theLibraryName = NULL,
+      bool              verbose = false
     );
 
@@ -96,19 +97,11 @@
 
     /*!
-     *  This method creates a coverage map for the specified symbol.
+     *  This method finds a coverage map for the specified symbol.
      *
-     *  @param[in] exefileName specifies the source of the information
      *  @param[in] symbolName specifies the name of the symbol
-     *  @param[in] lowAddress specifies the low address of the coverage map
-     *  @param[in] highAddress specifies the high address of the coverage map
      *
-     *  @return Returns a pointer to the coverage map
+     *  @return Returns a reference to the coverage map
      */
-    CoverageMapBase* createCoverageMap (
-      const std::string& exefileName,
-      const std::string& symbolName,
-      uint32_t           lowAddress,
-      uint32_t           highAddress
-    );
+    CoverageMapBase& findCoverageMap( const std::string& symbolName );
 
     /*!
@@ -144,4 +137,19 @@
 
   private:
+
+    /*!
+     *  This method creates a coverage map for the specified symbol.
+     *
+     *  @param[in] exefileName specifies the source of the information
+     *  @param[in] symbolName specifies the name of the symbol
+     *  @param[in] lowAddress specifies the low address of the coverage map
+     *  @param[in] highAddress specifies the high address of the coverage map
+     */
+    void createCoverageMap (
+      const std::string& exefileName,
+      const std::string& symbolName,
+      uint32_t           lowAddress,
+      uint32_t           highAddress
+    );
 
     /*!
Index: tester/covoar/ObjdumpProcessor.cc
===================================================================
--- tester/covoar/ObjdumpProcessor.cc	(revision f450227669787627547c0da120400eda2fc92e08)
+++ tester/covoar/ObjdumpProcessor.cc	(revision 99c90b3353bf5b638dcfd87803e4aaf02adf3219)
@@ -30,61 +30,15 @@
     ExecutableInfo* const            executableInfo,
     std::string&                     symbolName,
-    uint32_t                         lowAddress,
-    uint32_t                         highAddress,
     ObjdumpProcessor::objdumpLines_t instructions
   ) {
-
-    CoverageMapBase*                                   aCoverageMap = NULL;
-    uint32_t                                           endAddress = highAddress;
-    ObjdumpProcessor::objdumpLines_t::iterator         itr, fnop, lnop;
-    ObjdumpProcessor::objdumpLines_t::reverse_iterator ritr;
-    SymbolInformation*                                 symbolInfo = NULL;
-    SymbolTable*                                       theSymbolTable;
-
-    //
-    // Remove trailing nop instructions.
-    //
-
-    // First find the last instruction.
-    for (ritr = instructions.rbegin();
-         ritr != instructions.rend();
-         ritr++) {
-      if (ritr->isInstruction)
-        break;
-    }
-
-    // If an instruction was found and it is a nop, ...
-    if ((ritr != instructions.rend()) && (ritr->isNop)) {
-
-      // save it as the last nop.  Note that we must account for
-      // the difference between a forward and a reverse iterator.
-      lnop = ritr.base();
-      lnop--;
-      endAddress -= lnop->nopSize;
-
-      // Now look for the first nop in the sequence of trailing nops.
-      fnop = lnop;
-      ritr++;
-      for (; ritr != instructions.rend(); ritr++) {
-        if (ritr->isNop) {
-          fnop = ritr.base();
-          fnop--;
-          endAddress -= fnop->nopSize;
-        }
-        else
-          break;
-      }
-
-      // Erase trailing nops.  The erase operation wants the first
-      // parameter to point to the first item to erase and the second
-      // parameter to point to the item beyond the last item to erase.
-      if ( fnop == lnop )
-        instructions.erase( fnop );
-      else
-        instructions.erase( fnop, ++lnop );
-    }
+    // Find the symbol's coverage map.
+    CoverageMapBase& coverageMap = executableInfo->findCoverageMap( symbolName );
+
+    uint32_t lowAddress = coverageMap.getFirstLowAddress();
+    uint32_t size = coverageMap.getSize();
+    uint32_t highAddress = lowAddress + size;
 
     // If there are NOT already saved instructions, save them.
-    symbolInfo = SymbolsToAnalyze->find( symbolName );
+    SymbolInformation* symbolInfo = SymbolsToAnalyze->find( symbolName );
     if (symbolInfo->instructions.empty()) {
       symbolInfo->sourceFile = executableInfo;
@@ -94,30 +48,18 @@
 
     // Add the symbol to this executable's symbol table.
-    theSymbolTable = executableInfo->getSymbolTable();
+    SymbolTable* theSymbolTable = executableInfo->getSymbolTable();
     theSymbolTable->addSymbol(
-      symbolName, lowAddress, endAddress - lowAddress + 1
+      symbolName, lowAddress, highAddress - lowAddress + 1
     );
 
-    // Create a coverage map for the symbol.
-    aCoverageMap = executableInfo->createCoverageMap(
-      executableInfo->getFileName().c_str(), symbolName, lowAddress, endAddress
+    // Mark the start of each instruction in the coverage map.
+    for (auto& instruction : instructions) {
+      coverageMap.setIsStartOfInstruction( instruction.address );
+    }
+
+    // Create a unified coverage map for the symbol.
+    SymbolsToAnalyze->createCoverageMap(
+      executableInfo->getFileName().c_str(), symbolName, size
     );
-
-    if (aCoverageMap) {
-
-      // Mark the start of each instruction in the coverage map.
-      for (itr = instructions.begin();
-           itr != instructions.end();
-           itr++ ) {
-
-        aCoverageMap->setIsStartOfInstruction( itr->address );
-      }
-
-      // Create a unified coverage map for the symbol.
-      SymbolsToAnalyze->createCoverageMap(
-        executableInfo->getFileName().c_str(), symbolName,
-        endAddress - lowAddress + 1
-      );
-    }
   }
 
@@ -354,9 +296,7 @@
 
     while ( true ) {
-
       // Get the line.
       objdumpFile.read_line( line );
       if ( line.empty() ) {
-
         // If we are currently processing a symbol, finalize it.
         if (processSymbol) {
@@ -364,6 +304,4 @@
             executableInformation,
             currentSymbol,
-            startAddress,
-            executableInformation->getLoadAddress() + offset,
             theInstructions
           );
@@ -389,4 +327,7 @@
       lineInfo.isBranch      = false;
 
+      instruction[0] = '\0';
+      ID[0] = '\0';
+
       // Look for the start of a symbol's objdump and extract
       // offset and symbol (i.e. offset <symbolname>:).
@@ -408,5 +349,4 @@
       // If all items found, we are at the beginning of a symbol's objdump.
       if ((items == 3) && (terminator1 == ':')) {
-
         endAddress = executableInformation->getLoadAddress() + offset - 1;
 
@@ -416,6 +356,4 @@
             executableInformation,
             currentSymbol,
-            startAddress,
-            endAddress,
             theInstructions
           );
@@ -442,18 +380,15 @@
                && processSymbol )
       {
-
-          endAddress = executableInformation->getLoadAddress() + offset - 1;
-
-          // If we are currently processing a symbol, finalize it.
-          if ( processSymbol ) {
-            finalizeSymbol(
-              executableInformation,
-              currentSymbol,
-              startAddress,
-              endAddress,
-              theInstructions
+        endAddress = executableInformation->getLoadAddress() + offset - 1;
+
+        // If we are currently processing a symbol, finalize it.
+        if ( processSymbol ) {
+          finalizeSymbol(
+            executableInformation,
+            currentSymbol,
+            theInstructions
             );
-          }
-          processSymbol = false;
+        }
+        processSymbol = false;
       }
       else if (processSymbol) {
@@ -468,5 +403,4 @@
         // If it looks like an instruction ...
         if ((items == 3) && (terminator1 == ':') && (terminator2 == '\t')) {
-
           // update the line's information, save it and ...
           lineInfo.address =
Index: tester/covoar/covoar.cc
===================================================================
--- tester/covoar/covoar.cc	(revision f450227669787627547c0da120400eda2fc92e08)
+++ tester/covoar/covoar.cc	(revision 99c90b3353bf5b638dcfd87803e4aaf02adf3219)
@@ -248,8 +248,10 @@
         if (dynamicLibrary) {
           executableInfo = new Coverage::ExecutableInfo(
-            singleExecutable, dynamicLibrary
+            singleExecutable, dynamicLibrary, Verbose
           );
         } else {
-          executableInfo = new Coverage::ExecutableInfo( singleExecutable );
+          executableInfo = new Coverage::ExecutableInfo(
+            singleExecutable, nullptr, Verbose
+          );
         }
 
@@ -273,5 +275,7 @@
                     << std::endl;
         } else {
-          executableInfo = new Coverage::ExecutableInfo( argv[i] );
+          executableInfo = new Coverage::ExecutableInfo(
+            argv[i], nullptr, Verbose
+          );
           executablesToAnalyze.push_back( executableInfo );
           coverageFileNames.push_back( coverageFileName );
@@ -574,13 +578,5 @@
   catch (std::exception e)
   {
-    int   status;
-    char* realname;
-    realname = abi::__cxa_demangle (e.what(), 0, 0, &status);
-    std::cerr << "error: exception: " << realname << " [";
-    ::free (realname);
-    const std::type_info &ti = typeid (e);
-    realname = abi::__cxa_demangle (ti.name(), 0, 0, &status);
-    std::cerr << realname << "] " << e.what () << std::endl << std::flush;
-    ::free (realname);
+    rld::output_std_exception(e, std::cerr);
     ec = 11;
   }
Index: tester/covoar/wscript
===================================================================
--- tester/covoar/wscript	(revision f450227669787627547c0da120400eda2fc92e08)
+++ tester/covoar/wscript	(revision 99c90b3353bf5b638dcfd87803e4aaf02adf3219)
@@ -107,6 +107,6 @@
                         'Target_powerpc.cc',
                         'Target_sparc.cc'],
-              cflags = ['-O2', '-g'],
-              cxxflags = ['-std=c++11', '-O2', '-g'],
+              cflags = ['-O2', '-g', '-Wall'],
+              cxxflags = ['-std=c++11', '-O2', '-g', '-Wall'],
               includes = ['.'] + rtl_includes)
 
