Commit 76d900ba authored by Julien Balette-Pape's avatar Julien Balette-Pape

debug continue

parent d0e23d58
......@@ -9,7 +9,7 @@ namespace lrusecurity
{
struct Ptr_addr_comparator
{
bool operator()(const otawa::Address* a, const otawa::Address*b ) const {return *a < *b;}
bool operator()(const otawa::Address* a, const otawa::Address* b ) const {return *a < *b;}
};
class ACSSecurity : public elm::AllocArray<std::set <otawa::Address *, Ptr_addr_comparator>>
......@@ -22,8 +22,10 @@ namespace lrusecurity
(*this)[i] = std::set <otawa::Address *, Ptr_addr_comparator>();
}
ACSSecurity(int n, otawa::Address addr) : elm::AllocArray<std::set <otawa::Address *, Ptr_addr_comparator>>(n) {
for (int i = 0; i < n; i++)
(*this)[i] = std::set <otawa::Address *, Ptr_addr_comparator>({&addr});
for (int i = 0; i < n; i++){
(*this)[i] = std::set <otawa::Address *, Ptr_addr_comparator>();
(*this)[i].insert({&addr});
}
}
void print(int set, const otawa::icat3::LBlockCollection& coll, elm::io::Output& out= elm::cout) const;
};
......
......@@ -113,13 +113,12 @@ protected:
ACSSecurity prev = (*EXIST_HIT_PREV_IN(bb))[set];
int index = otawa::icat3::LBLOCK(access)->index();
number = prev[index].size();
std::set<otawa::Address *, Ptr_addr_comparator>::iterator iter = prev[index].begin();
int debug = 1;
while (iter != prev[index].end()){
std::set<otawa::Address *, Ptr_addr_comparator>::iterator iter;
int debug = 0; //FIXME
for (iter = prev[index].begin(); iter != prev[index].end(); iter++){
_out << *(*iter) << "\n\t\t\t\t\b";
iter++;
_out << debug;
debug++;
_out << debug;
}
// REMONTEE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment