DotModificator.h 713 Bytes
Newer Older
1 2 3 4 5 6
#ifndef LRUSECURITY_DOT_MODIFICATOR_H
#define LRUSECURITY_DOT_MODIFICATOR_H

#include <otawa/icache/features.h>
#include <otawa/base.h>
#include <otawa/cfg/CFG.h>
Julien Balette-Pape's avatar
Julien Balette-Pape committed
7
#include "AccMatching.h"
8 9 10 11 12 13 14

namespace lrusecurity
{

class DotModificator
{
public:
Julien Balette-Pape's avatar
Julien Balette-Pape committed
15
    DotModificator(const char *dot_file, AccMatcher *match):_filename(dot_file), _accM(match), _count(0){};
Julien Balette-Pape's avatar
Julien Balette-Pape committed
16
    void modify(otawa::CFG *cfg, const otawa::icache::Access *access, otawa::Address address);
17
    void finish(void);
Julien Balette-Pape's avatar
Julien Balette-Pape committed
18
    inline AccMatcher *getMatcher(void){return _accM;};
19
    inline bool isFirst(void){return _count == 0;};
20 21 22

private:
    const char *_filename;
Julien Balette-Pape's avatar
Julien Balette-Pape committed
23
    AccMatcher *_accM;
24 25 26 27 28 29 30
    int _count;
};

}


#endif /* ifndef LRUSECURITY_DOT_MODIFICATOR_H */