1 #ifndef AESALON_MONITOR_TAINT_TRACKER_H
2 #define AESALON_MONITOR_TAINT_TRACKER_H
6 #include "asm/Instruction.h"
7 #include "asm/InstructionList.h"
8 #include "asm/Disassembler.h"
9 #include "ptrace/BreakpointObserver.h"
10 #include "TaintedData.h"
15 class TaintTracker
: public PTrace::BreakpointObserver
{
17 typedef std::vector
<Misc::SmartPointer
<TaintedData
> > tainted_data_t
;
19 Misc::SmartPointer
<ASM::Disassembler
> disassembler
;
20 tainted_data_t tainted_data
;
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