Began removal of platform/. The Monitor:: namespace is completely converted.
[aesalon.git] / src / monitor / TaintTracker.h
blob4804e49e90501ff74f56d381c4ee716aa1ed04cc
1 #ifndef AESALON_MONITOR_TAINT_TRACKER_H
2 #define AESALON_MONITOR_TAINT_TRACKER_H
4 #include <vector>
6 #include "asm/Instruction.h"
7 #include "asm/InstructionList.h"
8 #include "asm/Disassembler.h"
9 #include "ptrace/BreakpointObserver.h"
10 #include "TaintedData.h"
12 namespace Aesalon {
13 namespace Monitor {
15 class TaintTracker : public PTrace::BreakpointObserver {
16 protected:
17 typedef std::vector<Misc::SmartPointer<TaintedData> > tainted_data_t;
18 private:
19 Misc::SmartPointer<ASM::Disassembler> disassembler;
20 tainted_data_t tainted_data;
21 public:
22 TaintTracker(Misc::SmartPointer<ASM::Disassembler> disassembler) : disassembler(disassembler) {}
23 virtual ~TaintTracker() {}
25 Misc::SmartPointer<TaintedData> get_tainted_data(Word address) const;
26 void add_tainted_data(Misc::SmartPointer<TaintedData> new_tainted_data) {
27 tainted_data.push_back(new_tainted_data);
30 virtual void handle_breakpoint(const PTrace::BreakpointReference &breakpoint);
32 void place_breakpoints(std::string symbol);
35 } // namespace Monitor
36 } // namespace Aesalon
38 #endif