source: rtems-testing/rtems-coverage/TraceList.cc @ b212961

4.11
Last change on this file since b212961 was b212961, checked in by Jennifer Averett <Jennifer.Averett@…>, on Apr 22, 2010 at 7:14:07 PM

2010-04-22 Jennifer Averett <Jennifer.Averett@…>

  • Property mode set to 100644
File size: 786 bytes
Line 
1/*
2 *  $Id$
3 */
4
5#include "TraceList.h"
6#include <stdio.h>
7
8namespace Trace {
9
10    TraceList::TraceList()
11    {
12    }
13
14    TraceList::~TraceList() 
15    { 
16    }
17
18    void TraceList::add(
19      uint32_t         lowAddressArg,
20      uint32_t         highAddressArg,
21      exitReason_t     why
22    )
23    {
24      traceRange_t t;
25
26      t.lowAddress = lowAddressArg;
27      t.length = highAddressArg - lowAddressArg;
28      t.exitReason = why;
29
30      set.push_back( t );     
31    }
32
33    void  TraceList::ShowList()
34    {
35      ranges_t::iterator   ritr;
36
37      for ( ritr=set.begin(); ritr != set.end(); ritr++ ) {
38        printf(
39          "Start 0x%x, length 0x%03x Reason %d\n", 
40          ritr->lowAddress, 
41          ritr->length, 
42          ritr->exitReason
43        );
44      }
45    }
46
47}
Note: See TracBrowser for help on using the repository browser.