1 #include "TaintTracker.h"
2 #include "ptrace/BreakpointReference.h"
3 #include "Initializer.h"
8 void TaintTracker::handle_breakpoint(const PTrace::BreakpointReference
&breakpoint
) {
12 void TaintTracker::place_breakpoints(std::string symbol
) {
13 Misc::SmartPointer
<ASM::InstructionList
> il
= disassembler
->get_symbol_il(symbol
);
15 std::size_t instruction_count
= il
->get_instruction_count();
16 for(std::size_t x
= 0; x
< instruction_count
; x
++) {
17 Misc::SmartPointer
<ASM::Instruction
> instruction
= il
->get_instruction_by_index(x
);
18 if(instruction
->changes_memory()) {
19 Initializer::get_instance()->get_program_manager()->get_ptrace_portal()->place_breakpoint(instruction
->get_address(), this);
24 Misc::SmartPointer
<TaintedData
> TaintTracker::get_tainted_data(Word address
) const {
25 tainted_data_t::const_reverse_iterator i
= tainted_data
.rbegin();
27 for(; i
!= tainted_data
.rend(); i
++) {
28 if((*i
)->get_address() == address
) return *i
;
34 } // namespace Monitor
35 } // namespace Aesalon