20#include <introvirt/util/json/json.hh>
26#include <unordered_map>
109 virtual void write(std::ostream& os = std::cout)
const = 0;
116 virtual Json::Value
json()
const = 0;
127 void data(
const std::string& key,
const std::shared_ptr<void>& value);
132 void data(
const std::string& key, std::shared_ptr<void>&& value);
142 std::shared_ptr<void>
data(
const std::string& key);
149 std::shared_ptr<const void>
data(
const std::string& key)
const;
154 std::unordered_map<std::string, std::shared_ptr<void>> data_;
155 bool hook_return_ =
false;
Interface class for hypervisor events.
Definition Event.hh:43
Base class for function calls.
Definition FunctionCall.hh:33
std::shared_ptr< const void > data(const std::string &key) const
Retrieve arbitrary data stored with the FunctionCall.
void data(const std::string &key, const std::shared_ptr< void > &value)
Store arbitrary data with the FunctionCall.
virtual ~FunctionCall()=default
virtual void handle_return(Event &event)=0
Handle the return event.
virtual void return_address(const guest_ptr< void > &value)=0
Set the return address for this function call.
virtual guest_ptr< void > return_address() const =0
Get the return address for this function call.
virtual const std::string & library_name() const =0
Get the name of the library this call is for.
bool hook_return() const
Check if the user is requesting that the return be intercepted.
virtual const std::string & function_name() const =0
Get the function name.
void hook_return(bool val)
Configure if the return should be intercepted.
void data(const std::string &key, std::shared_ptr< void > &&value)
Store arbitrary data with the FunctionCall.
virtual bool is_return_event(Event &event) const =0
Check if the given event is a return event for this function call.
virtual void write(std::ostream &os=std::cout) const =0
Write out a textual representation of the function for display.
virtual Json::Value json() const =0
Get the function as Json.
std::shared_ptr< void > data(const std::string &key)
Retrieve arbitrary data stored with the FunctionCall.
virtual bool returned() const =0
Check if the call has returned.
Definition guest_ptr.hh:88
Type-safe guest virtual address pointer and guest_ptr template.
Core IntroVirt classes.
Definition Cr0.hh:20