blob: 51ecfd8c84626af4dfb145eedd579b1821f80486 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#include "TraceList.h"
#include <iostream>
#include <iomanip>
namespace Trace {
TraceList::TraceList()
{
}
TraceList::~TraceList()
{
}
void TraceList::add(
uint32_t lowAddressArg,
uint32_t highAddressArg,
exitReason_t why
)
{
traceRange_t t;
t.lowAddress = lowAddressArg;
t.length = highAddressArg - lowAddressArg;
t.exitReason = why;
set.push_back( t );
}
void TraceList::ShowTrace( traceRange_t *t)
{
std::cout << std::hex << "Start 0x" << t->lowAddress
<< ", length 0x" << std::setfill( '0' ) << std::setw( 3 )
<< t->length << " Reason " << t->exitReason << std::endl;
}
void TraceList::ShowList()
{
ranges_t::iterator ritr;
traceRange_t t;
for ( ritr=set.begin(); ritr != set.end(); ritr++ ) {
t = *ritr;
ShowTrace( &t );
}
}
}
|