<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems-testing (2011-01-25)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>jennifer</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-01-25 Jennifer Averett <Jennifer.Averett@OARcorp.com>

        * CoverageMapBase.cc, CoverageMapBase.h, CoverageReaderQEMU.cc,
        DesiredSymbols.cc, ExecutableInfo.cc, SymbolTable.cc, SymbolTable.h:
        Modifications to track multiple address ranges for the same symbol.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems-testing/covoar/ChangeLog.diff?r1=text&tr1=1.18&r2=text&tr2=1.19&diff_format=h">M</a></td><td width='1%'>1.19</td><td width='100%'>covoar/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems-testing/covoar/CoverageMapBase.h.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>covoar/CoverageMapBase.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems-testing/covoar/CoverageMapBase.cc.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>covoar/CoverageMapBase.cc</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems-testing/covoar/CoverageReaderQEMU.cc.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>covoar/CoverageReaderQEMU.cc</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems-testing/covoar/DesiredSymbols.cc.diff?r1=text&tr1=1.5&r2=text&tr2=1.6&diff_format=h">M</a></td><td width='1%'>1.6</td><td width='100%'>covoar/DesiredSymbols.cc</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems-testing/covoar/ExecutableInfo.cc.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>covoar/ExecutableInfo.cc</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems-testing/covoar/SymbolTable.h.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>covoar/SymbolTable.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems-testing/covoar/SymbolTable.cc.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>covoar/SymbolTable.cc</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems-testing/covoar/ChangeLog:1.18 rtems-testing/covoar/ChangeLog:1.19
--- rtems-testing/covoar/ChangeLog:1.18 Tue Jan 25 14:48:36 2011
+++ rtems-testing/covoar/ChangeLog      Tue Jan 25 15:26:00 2011
</font><font color='#997700'>@@ -1,3 +1,9 @@
</font><font color='#000088'>+2011-01-25    Jennifer Averett <Jennifer.Averett@OARcorp.com>
+
+       * CoverageMapBase.cc, CoverageMapBase.h, CoverageReaderQEMU.cc,
+       DesiredSymbols.cc, ExecutableInfo.cc, SymbolTable.cc, SymbolTable.h:
+       Modifications to track multiple address ranges for the same symbol.
+
</font> 2011-01-25        Joel Sherrill <joel.sherrill@oarcorp.com>
 
        * ExecutableInfo.cc: Hack a shot at seeing if symbol is already known.

<font color='#006600'>diff -u rtems-testing/covoar/CoverageMapBase.h:1.2 rtems-testing/covoar/CoverageMapBase.h:1.3
--- rtems-testing/covoar/CoverageMapBase.h:1.2  Mon Jan 17 16:19:16 2011
+++ rtems-testing/covoar/CoverageMapBase.h      Tue Jan 25 15:26:00 2011
</font><font color='#997700'>@@ -13,6 +13,7 @@
</font> 
 #include <stdint.h>
 #include <string>
<font color='#000088'>+#include <list>
</font> 
 namespace Coverage {
 
<font color='#997700'>@@ -24,6 +25,29 @@
</font> 
   public:
 
<font color='#000088'>+    /*!
+     *  This structure identifies the low and high addresses
+     *  of one range.  Note:: There may be more than one address<span style="background-color: #FF0000"> </span>
+     *  range per symbol.
+     */
+    typedef struct {
+      /*!
+       *  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;
+
+    } AddressRange_t;
+
+    /*
+     *  This type identifies a list of ranges.
+     */
+    typedef std::list< AddressRange_t > AddressRange;
+
</font>     /*!<span style="background-color: #FF0000"> </span>
      *  This method constructs a CoverageMapBase instance.
      *
<font color='#997700'>@@ -41,11 +65,65 @@
</font>     virtual ~CoverageMapBase();
 
     /*!
<font color='#000088'>+     *  This method adds a address range to the RangeList.
+     *
+     *  @param[in]  Low specifies the lowAddress
+     *  @param[in]  High specifies the highAddress
+     *<span style="background-color: #FF0000">  </span>
+     */
+    void Add( uint32_t low, uint32_t high );
+<span style="background-color: #FF0000"> </span>
+    /*!
+     *  This method returns true and sets the offset if
+     *  the address falls with the bounds of an address range<span style="background-color: #FF0000"> </span>
+     *  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.
+     *<span style="background-color: #FF0000">  </span>
+     *  @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;
+
+    /*!
</font>      *  This method prints the contents of the coverage map to stdout.
      */
     void dump( void ) const;
 
     /*!
<font color='#000088'>+     *  This method will return the low address of the first range in
+     *  the RangeList.
+     *
+     *  @return Returns the low address of the first range in
+     *  the RangeList.
+     */
+    int32_t getFirstLowAddress() const;
+
+    /*!
+     *  This method returns true and sets the address range if
+     *  the address falls with the bounds of an address range<span style="background-color: #FF0000"> </span>
+     *  in the RangeList.
+     *
+     *  @param[in]  address specifies the address to find
+     *  @param[out] range contains the high and low addresse for
+     *              the range
+     *<span style="background-color: #FF0000">  </span>
+     *  @return Returns TRUE if the address range can be found
+     *   and FALSE if it was not.
+     */
+    bool getRange( uint32_t address, AddressRange_t *range ) const;
+
+    /*!
+     *  This method returns the size of the address range.
+     *<span style="background-color: #FF0000"> </span>
+     *  @return Returns Size of the address range.
+     */
+    uint32_t getSize() const;
+
+
+    /*!
</font>      *  This method returns the address of the beginning of the
      *  instruction that contains the specified address.
      *
<font color='#997700'>@@ -65,15 +143,15 @@
</font>      *  This method returns the high address of the coverage map.
      *
      *  @return Returns the high address of the coverage map.
<font color='#880000'>-     */
</font>     uint32_t getHighAddress( void ) const;
<font color='#000088'>+     */
</font> 
     /*!
      *  This method returns the low address of the coverage map.
      *
      *  @return Returns the low address of the coverage map.
<font color='#880000'>-     */
</font>     uint32_t getLowAddress( void ) const;
<font color='#000088'>+     */
</font> 
     /*!
      *  This method sets the boolean which indicates if this
<font color='#997700'>@@ -250,21 +328,22 @@
</font>     } perAddressInfo_t;
 
     /*!
<font color='#880000'>-     *  This is a dynamically allocated array of data that is
-     *  kept for each address.
</font><font color='#000088'>+     *<span style="background-color: #FF0000"> </span>
+     *  This is a list of address ranges for this symbolic address.
</font>      */
<font color='#880000'>-    perAddressInfo_t* Info;
</font><font color='#000088'>+    AddressRange RangeList;
</font> 
     /*!
<font color='#880000'>-     *  This is the low address of the address map range.
</font><font color='#000088'>+     *<span style="background-color: #FF0000">  </span>
+     *  This variable contains the size of the code block.
</font>      */
<font color='#880000'>-    uint32_t lowAddress;
</font><font color='#000088'>+    uint32_t Size;
</font> 
     /*!
<font color='#880000'>-     *  This is the high address of the address map range.
</font><font color='#000088'>+     *  This is a dynamically allocated array of data that is
+     *  kept for each address.
</font>      */
<font color='#880000'>-    uint32_t highAddress;
-
</font><font color='#000088'>+    perAddressInfo_t* Info;
</font>   };
 
 }

<font color='#006600'>diff -u rtems-testing/covoar/CoverageMapBase.cc:1.2 rtems-testing/covoar/CoverageMapBase.cc:1.3
--- rtems-testing/covoar/CoverageMapBase.cc:1.2 Mon Jan 17 16:19:16 2011
+++ rtems-testing/covoar/CoverageMapBase.cc     Tue Jan 25 15:26:00 2011
</font><font color='#997700'>@@ -22,15 +22,22 @@
</font>   CoverageMapBase::CoverageMapBase(
     uint32_t low,
     uint32_t high
<font color='#880000'>-  ) : lowAddress(low), highAddress(high)
</font><font color='#000088'>+  )
</font>   {
<font color='#880000'>-    uint32_t a;
</font><font color='#000088'>+    uint32_t       a;
+    AddressRange_t range;
+
+    range.lowAddress  = low;
+    range.highAddress = high;
+    RangeList.push_back( range );
+
+    Size = high - low + 1;
</font> 
<font color='#880000'>-    Info = new perAddressInfo_t[ high - low + 1 ];
</font><font color='#000088'>+    Info = new perAddressInfo_t[ Size ];
</font> 
<font color='#880000'>-    for (a=low; a<=high; a++) {
</font><font color='#000088'>+    for (a=0; a<Size; a++) {
</font> 
<font color='#880000'>-      perAddressInfo_t *i = &Info[ a-low ];
</font><font color='#000088'>+      perAddressInfo_t *i = &Info[ a ];
</font> 
       i->isStartOfInstruction = false;
       i->wasExecuted          = false;
<font color='#997700'>@@ -45,6 +52,33 @@
</font>     if (Info)
       delete Info;
   }
<font color='#000088'>+<span style="background-color: #FF0000"> </span>
+  void  CoverageMapBase::Add( uint32_t low, uint32_t high )
+  {
+    AddressRange_t range;
+
+    range.lowAddress  = low;
+    range.highAddress = high;
+    RangeList.push_back( range );
+  }
+<span style="background-color: #FF0000"> </span>
+  bool CoverageMapBase::determineOffset(<span style="background-color: #FF0000"> </span>
+    uint32_t  address,<span style="background-color: #FF0000"> </span>
+    uint32_t *offset
+  )const
+  {
+    AddressRange::const_iterator  itr;
+
+    for ( itr = RangeList.begin(); itr != RangeList.end(); itr++ ) {
+      if ((address >= itr->lowAddress) && (address <= itr->highAddress)){
+        *offset = address - itr->lowAddress;
+        return true;
+      }
+    }
+    *offset = 0;
+    return false;
+  }
+
</font> 
   void CoverageMapBase::dump( void ) const {
 
<font color='#997700'>@@ -53,14 +87,18 @@
</font> 
     fprintf( stderr, "Coverage Map Contents:\n" );
 
<font color='#880000'>-    for (a = lowAddress; a <= highAddress; a++) {
</font><font color='#000088'>+    /*
+     * XXX - Dump is only marking the first Address Range.
+     */
</font> 
<font color='#880000'>-      entry = &Info[ a - lowAddress ];
</font><font color='#000088'>+    for (a = 0; a < Size; a++) {
+
+      entry = &Info[ a ];
</font> 
       fprintf(
         stderr,
         "0x%x - isStartOfInstruction = %s, wasExecuted = %s\n",
<font color='#880000'>-        a,
</font><font color='#000088'>+        a + RangeList.front().lowAddress,
</font>         entry->isStartOfInstruction ? "TRUE" : "FALSE",
         entry->wasExecuted ? "TRUE" : "FALSE"
       );
<font color='#997700'>@@ -79,16 +117,19 @@
</font>     uint32_t* beginning
   ) const
   {
<font color='#880000'>-    bool     status = false;
-    uint32_t start;
</font><font color='#000088'>+    bool           status = false;
+    uint32_t       start;
+    AddressRange_t range;
+
</font> 
<font color='#880000'>-    if ((address < lowAddress) || (address > highAddress))
</font><font color='#000088'>+    status = getRange( address, &range );
+    if ( status != true )
</font>       return status;
 
     start = address;
 
<font color='#880000'>-    while (start >= lowAddress ) {
-      if (Info[ start - lowAddress ].isStartOfInstruction) {
</font><font color='#000088'>+    while (start >= range.lowAddress ) {
+      if (Info[ start - range.lowAddress ].isStartOfInstruction) {
</font>         *beginning = start;
         status = true;
         break;
<font color='#997700'>@@ -100,119 +141,184 @@
</font>     return status;
   }
 
<font color='#880000'>-  uint32_t CoverageMapBase::getHighAddress( void ) const
</font><font color='#000088'>+  int32_t CoverageMapBase::getFirstLowAddress() const
+  {
+    return RangeList.front().lowAddress;
+  }
+
+  bool CoverageMapBase::getRange( uint32_t address, AddressRange_t *range ) const
</font>   {
<font color='#880000'>-    return highAddress;
</font><font color='#000088'>+    AddressRange::const_iterator  itr;
+
+    for ( itr = RangeList.begin(); itr != RangeList.end(); itr++ ) {
+      if ((address >= itr->lowAddress) && (address <= itr->highAddress)){
+        range->lowAddress = itr->lowAddress;
+        range->highAddress = itr->highAddress;
+        return true;
+      }
+    }
+
+    range->lowAddress  = 0;
+    range->highAddress = 0;
+
+    return false;
+
</font>   }
 
<font color='#880000'>-  uint32_t CoverageMapBase::getLowAddress( void ) const
</font><font color='#000088'>+  uint32_t CoverageMapBase::getSize() const
</font>   {
<font color='#880000'>-    return lowAddress;
</font><font color='#000088'>+    return Size;
</font>   }
 
   void CoverageMapBase::setIsStartOfInstruction(
     uint32_t    address
   )
   {
<font color='#880000'>-    if ((address < lowAddress) || (address > highAddress))
</font><font color='#000088'>+    uint32_t offset;
+<span style="background-color: #FF0000"> </span>
+    if (determineOffset( address, &offset ) != true)
</font>       return;
<font color='#880000'>-    Info[ address - lowAddress ].isStartOfInstruction = true;
</font><font color='#000088'>+
+    Info[ offset ].isStartOfInstruction = true;
</font>   }
 
   bool CoverageMapBase::isStartOfInstruction( uint32_t address ) const
   {
<font color='#880000'>-    if ((address < lowAddress) || (address > highAddress))
</font><font color='#000088'>+    uint32_t offset;
+<span style="background-color: #FF0000"> </span>
+    if (determineOffset( address, &offset ) != true)
</font>       return false;
<font color='#880000'>-    return Info[ address - lowAddress ].isStartOfInstruction;
</font><font color='#000088'>+
+    return Info[ offset ].isStartOfInstruction;
</font>   }
 
   void CoverageMapBase::setWasExecuted( uint32_t address )
   {
<font color='#880000'>-    if ((address < lowAddress) || (address > highAddress))
</font><font color='#000088'>+    uint32_t offset;
+<span style="background-color: #FF0000"> </span>
+    if (determineOffset( address, &offset ) != true)
</font>       return;
<font color='#880000'>-    Info[ address - lowAddress ].wasExecuted = true;
</font><font color='#000088'>+
+    Info[ offset ].wasExecuted = true;
</font>   }
 
   bool CoverageMapBase::wasExecuted( uint32_t address ) const
   {
<font color='#880000'>-    if ((address < lowAddress) || (address > highAddress))
</font><font color='#000088'>+    uint32_t offset;
+<span style="background-color: #FF0000"> </span>
+    if (determineOffset( address, &offset ) != true)
</font>       return false;
<font color='#880000'>-    return Info[ address - lowAddress ].wasExecuted;
</font><font color='#000088'>+
+   return Info[ offset ].wasExecuted;
</font>   }
 
   void CoverageMapBase::setIsBranch(
     uint32_t    address
   )
   {
<font color='#880000'>-    if ((address < lowAddress) || (address > highAddress))
</font><font color='#000088'>+    uint32_t offset;
+<span style="background-color: #FF0000"> </span>
+    if (determineOffset( address, &offset ) != true)
</font>       return;
<font color='#880000'>-    Info[ address - lowAddress ].isBranch = true;
</font><font color='#000088'>+
+    Info[ offset ].isBranch = true;
</font>   }
 
   bool CoverageMapBase::isNop( uint32_t address ) const
   {
<font color='#880000'>-    if ((address < lowAddress) || (address > highAddress))
</font><font color='#000088'>+    uint32_t offset;
+<span style="background-color: #FF0000"> </span>
+    if (determineOffset( address, &offset ) != true)
</font>       return false;
<font color='#880000'>-    return Info[ address - lowAddress ].isNop;
</font><font color='#000088'>+
+    return Info[ offset ].isNop;
</font>   }
 
   void CoverageMapBase::setIsNop(
     uint32_t    address
   )
   {
<font color='#880000'>-    if ((address < lowAddress) || (address > highAddress))
</font><font color='#000088'>+    uint32_t offset;
+<span style="background-color: #FF0000"> </span>
+    if (determineOffset( address, &offset ) != true)
</font>       return;
<font color='#880000'>-    Info[ address - lowAddress ].isNop = true;
</font><font color='#000088'>+
+    Info[ offset ].isNop = true;
</font>   }
 
   bool CoverageMapBase::isBranch( uint32_t address ) const
   {
<font color='#880000'>-    if ((address < lowAddress) || (address > highAddress))
</font><font color='#000088'>+    uint32_t offset;
+<span style="background-color: #FF0000"> </span>
+    if (determineOffset( address, &offset ) != true)
</font>       return false;
<font color='#880000'>-    return Info[ address - lowAddress ].isBranch;
</font><font color='#000088'>+
+    return Info[ offset ].isBranch;
</font>   }
 
   void CoverageMapBase::setWasTaken(
     uint32_t    address
   )
   {
<font color='#880000'>-    if ((address < lowAddress) || (address > highAddress))
</font><font color='#000088'>+    uint32_t offset;
+<span style="background-color: #FF0000"> </span>
+    if (determineOffset( address, &offset ) != true)
</font>       return;
<font color='#880000'>-    Info[ address - lowAddress ].wasTaken = true;
</font><font color='#000088'>+
+    Info[ offset ].wasTaken = true;
</font>   }
 
   void CoverageMapBase::setWasNotTaken(
     uint32_t    address
   )
   {
<font color='#880000'>-    if ((address < lowAddress) || (address > highAddress))
</font><font color='#000088'>+    uint32_t offset;
+<span style="background-color: #FF0000"> </span>
+    if (determineOffset( address, &offset ) != true)
</font>       return;
<font color='#880000'>-    Info[ address - lowAddress ].wasNotTaken = true;
</font><font color='#000088'>+
+    Info[ offset ].wasNotTaken = true;
</font>   }
 
   bool CoverageMapBase::wasAlwaysTaken( uint32_t address ) const
   {
<font color='#880000'>-    if ((address < lowAddress) || (address > highAddress))
</font><font color='#000088'>+    uint32_t offset;
+<span style="background-color: #FF0000"> </span>
+    if (determineOffset( address, &offset ) != true)
</font>       return false;
<font color='#880000'>-    return (Info[ address - lowAddress ].wasTaken &&
-            !Info[ address - lowAddress ].wasNotTaken);
</font><font color='#000088'>+
+    return (Info[ offset ].wasTaken &&
+            !Info[ offset ].wasNotTaken);
</font>   }
 
   bool CoverageMapBase::wasNeverTaken( uint32_t address ) const
   {
<font color='#880000'>-    if ((address < lowAddress) || (address > highAddress))
</font><font color='#000088'>+    uint32_t offset;
+<span style="background-color: #FF0000"> </span>
+    if (determineOffset( address, &offset ) != true)
</font>       return false;
<font color='#880000'>-    return (!Info[ address - lowAddress ].wasTaken &&
-            Info[ address - lowAddress ].wasNotTaken);
</font><font color='#000088'>+
+    return (!Info[ offset ].wasTaken &&
+            Info[ offset ].wasNotTaken);
</font>   }
 
   bool CoverageMapBase::wasNotTaken( uint32_t address ) const
   {
<font color='#880000'>-    return (Info[ address - lowAddress ].wasNotTaken);
</font><font color='#000088'>+    uint32_t offset;
+<span style="background-color: #FF0000"> </span>
+    if (determineOffset( address, &offset ) != true)
+      return false;
+
+    return Info[ offset ].wasNotTaken;
</font>   }
 
   bool CoverageMapBase::wasTaken( uint32_t address ) const
   {
<font color='#880000'>-    return (Info[ address - lowAddress ].wasTaken);
</font><font color='#000088'>+    uint32_t offset;
+<span style="background-color: #FF0000"> </span>
+    if (determineOffset( address, &offset ) != true)
+      return false;
+
+    return Info[ offset ].wasTaken;
</font>   }
 }

<font color='#006600'>diff -u rtems-testing/covoar/CoverageReaderQEMU.cc:1.3 rtems-testing/covoar/CoverageReaderQEMU.cc:1.4
--- rtems-testing/covoar/CoverageReaderQEMU.cc:1.3      Mon Jan 24 15:11:25 2011
+++ rtems-testing/covoar/CoverageReaderQEMU.cc  Tue Jan 25 15:26:00 2011
</font><font color='#997700'>@@ -141,23 +141,20 @@
</font> 
         // Determine if additional branch information is available.
         if ( (entry->op & branchInfo) != 0 ) {
<font color='#880000'>-          unsigned int a = entry->pc + entry->size - 1;
-          if ( (entry->pc < aCoverageMap->getLowAddress()) ||
-               (entry->pc > aCoverageMap->getHighAddress()) ||
-               (a < aCoverageMap->getLowAddress()) ||
-               (a > aCoverageMap->getHighAddress()) ) {
</font><font color='#000088'>+          uint32_t  offset_e, offset_a;
+          uint32_t  a = entry->pc + entry->size - 1;
+          if ((aCoverageMap->determineOffset( a, &offset_a ) != true)   ||
+             (aCoverageMap->determineOffset( entry->pc, &offset_e ) != true))
+          {
</font>             fprintf(
               stderr,
               "*** Trace block is inconsistent with coverage map\n"
               "*** Trace block (0x%08x - 0x%08x) for %d bytes\n"
<font color='#880000'>-              "*** Coverage map (0x%08x - 0x%08x) for %d bytes\n",
</font><font color='#000088'>+              "*** Coverage map XXX \n",
</font>               entry->pc,
               a,
<font color='#880000'>-              entry->size,
-              aCoverageMap->getLowAddress(),
-              aCoverageMap->getHighAddress(),
-              aCoverageMap->getHighAddress() - aCoverageMap->getLowAddress()
-           );
</font><font color='#000088'>+              entry->size
+            );
</font>           } else {
             while (!aCoverageMap->isStartOfInstruction(a))
               a--;

<font color='#006600'>diff -u rtems-testing/covoar/DesiredSymbols.cc:1.5 rtems-testing/covoar/DesiredSymbols.cc:1.6
--- rtems-testing/covoar/DesiredSymbols.cc:1.5  Mon Jan 17 16:19:16 2011
+++ rtems-testing/covoar/DesiredSymbols.cc      Tue Jan 25 15:26:00 2011
</font><font color='#997700'>@@ -89,6 +89,8 @@
</font>             line,
             inputBuffer
           );
<font color='#000088'>+
+          delete symInfo;
</font>         }
 
         // Add this to the set of symbols.
<font color='#997700'>@@ -627,7 +629,7 @@
</font>     uint32_t              sAddress;
     uint32_t              sBaseAddress;
     uint32_t              sMapSize;
<font color='#880000'>-
</font><font color='#000088'>+<span style="background-color: #FF0000">    </span>
</font>     // Ensure that the symbol is a desired symbol.
     itr = set.find( symbolName );
 
<font color='#997700'>@@ -645,8 +647,8 @@
</font>     // Ensure that the source and destination coverage maps
     // are the same size.
     dMapSize = itr->second.stats.sizeInBytes;
<font color='#880000'>-    sBaseAddress = sourceCoverageMap->getLowAddress();
-    sMapSize = sourceCoverageMap->getHighAddress() - sBaseAddress + 1;
</font><font color='#000088'>+    sBaseAddress = sourceCoverageMap->getFirstLowAddress();
+    sMapSize = sourceCoverageMap->getSize();
</font>     if (dMapSize != sMapSize) {
 
       fprintf(

<font color='#006600'>diff -u rtems-testing/covoar/ExecutableInfo.cc:1.2 rtems-testing/covoar/ExecutableInfo.cc:1.3
--- rtems-testing/covoar/ExecutableInfo.cc:1.2  Tue Jan 25 14:48:36 2011
+++ rtems-testing/covoar/ExecutableInfo.cc      Tue Jan 25 15:26:00 2011
</font><font color='#997700'>@@ -90,13 +90,15 @@
</font>     uint32_t           highAddress
   )
   {
<font color='#880000'>-    CoverageMapBase* theMap;
</font><font color='#000088'>+    CoverageMapBase                          *theMap;
+    ExecutableInfo::coverageMaps_t::iterator  itr;
</font> 
<font color='#880000'>-    theMap = coverageMaps.find( symbolName );
-    if ( theMap == std::map.end() ) {
</font><font color='#000088'>+    itr = coverageMaps.find( symbolName );
+    if ( itr == coverageMaps.end() ) {
</font>       theMap = new CoverageMap( lowAddress, highAddress );
       coverageMaps[ symbolName ] = theMap;
     } else {
<font color='#000088'>+      theMap = itr->second;
</font>       theMap->Add( lowAddress, highAddress );
     }
     return theMap;

<font color='#006600'>diff -u rtems-testing/covoar/SymbolTable.h:1.1 rtems-testing/covoar/SymbolTable.h:1.2
--- rtems-testing/covoar/SymbolTable.h:1.1      Mon May 24 15:07:08 2010
+++ rtems-testing/covoar/SymbolTable.h  Tue Jan 25 15:26:00 2011
</font><font color='#997700'>@@ -14,6 +14,7 @@
</font> #include <stdint.h>
 #include <string>
 #include <map>
<font color='#000088'>+#include <list>
</font> 
 namespace Coverage {
 
<font color='#997700'>@@ -33,7 +34,11 @@
</font>     typedef struct {
       uint32_t startingAddress;
       uint32_t length;
<font color='#880000'>-    } symbolInfo;
</font><font color='#000088'>+    } symbolInfo_t;
+<span style="background-color: #FF0000"> </span>
+   typedef std::list< symbolInfo_t > symbolInfo;
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000">    </span>
</font> 
     /*!
      *  This method constructs a SymbolTable instance.

<font color='#006600'>diff -u rtems-testing/covoar/SymbolTable.cc:1.1 rtems-testing/covoar/SymbolTable.cc:1.2
--- rtems-testing/covoar/SymbolTable.cc:1.1     Mon May 24 15:07:08 2010
+++ rtems-testing/covoar/SymbolTable.cc Tue Jan 25 15:26:00 2011
</font><font color='#997700'>@@ -33,9 +33,9 @@
</font>     const uint32_t     length
   )
   {
<font color='#880000'>-    uint32_t       end = 0;
-    symbol_entry_t entry;
-    symbolInfo     symbolData;
</font><font color='#000088'>+    uint32_t         end = 0;
+    symbol_entry_t   entry;
+    symbolInfo_t     symbolData;
</font> 
     // Add an entry to the address map.
     end = start + length - 1;
<font color='#997700'>@@ -47,7 +47,15 @@
</font>     // Add an entry to the symbol information map.
     symbolData.startingAddress = start;
     symbolData.length = length;
<font color='#880000'>-    info[ symbol ] = symbolData;
</font><font color='#000088'>+<span style="background-color: #FF0000">     </span>
+    if ( info[ symbol ].empty() == false ) {
+      if ( info[symbol ].front().length != length ) {
+        fprintf(stderr, "ERROR==> Different lengths for the symbol %s\n", symbol.c_str() );
+        exit( 0 );
+      }
+    }
+<span style="background-color: #FF0000">    </span>
+    info[ symbol ].push_back( symbolData );
</font>   }
 
   SymbolTable::symbolInfo* SymbolTable::getInfo(
<font color='#997700'>@@ -71,7 +79,7 @@
</font>     if (it == info.end())
       return 0;
     else
<font color='#880000'>-      return ((*it).second.length);
</font><font color='#000088'>+      return ((*it).second.front().length);
</font>   }
 
   std::string SymbolTable::getSymbol(
</pre>
<p> </p>

<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>