1 // See LICENSE for license details.
14 virtual ~memtracer_t() {}
16 virtual bool interested_in_range(uint64_t begin
, uint64_t end
, bool store
, bool fetch
) = 0;
17 virtual void trace(uint64_t addr
, size_t bytes
, bool store
, bool fetch
) = 0;
20 class memtracer_list_t
: public memtracer_t
23 bool interested_in_range(uint64_t begin
, uint64_t end
, bool store
, bool fetch
)
25 for (std::vector
<memtracer_t
*>::iterator it
= list
.begin(); it
!= list
.end(); ++it
)
26 if ((*it
)->interested_in_range(begin
, end
, store
, fetch
))
30 void trace(uint64_t addr
, size_t bytes
, bool store
, bool fetch
)
32 for (std::vector
<memtracer_t
*>::iterator it
= list
.begin(); it
!= list
.end(); ++it
)
33 (*it
)->trace(addr
, bytes
, store
, fetch
);
35 void hook(memtracer_t
* h
)
40 std::vector
<memtracer_t
*> list
;