libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
introvirt::SystemCall Class Referenceabstract

#include <SystemCall.hh>

Inheritance diagram for introvirt::SystemCall:

Public Member Functions

virtual const std::string & name () const =0
 Get the name of the system call.
 
virtual void write (std::ostream &os=std::cout) const =0
 Write a human-readable description of this system call.
 
virtual Json::Value json () const =0
 
virtual bool will_return () const =0
 
virtual void data (const std::string &key, const std::shared_ptr< void > &value)=0
 Store arbitrary data with the SystemCall.
 
virtual void data (const std::string &key, std::shared_ptr< void > &&value)=0
 Store arbitrary data with the SystemCall.
 
virtual std::shared_ptr< void > data (const std::string &key)=0
 Retrieve arbitrary data stored with the SystemCall.
 
virtual std::shared_ptr< const void > data (const std::string &key) const =0
 Retrieve arbitrary data stored with the SystemCall.
 
virtual bool supported () const =0
 Check if this system call is supported by a more specific handler.
 
virtual void handle_return_event (Event &event)=0
 Handle a system call return event.
 
virtual ~SystemCall ()=default
 Destroy the instance.
 

Detailed Description

Abstract base class for a system call handler

Constructor & Destructor Documentation

◆ ~SystemCall()

virtual introvirt::SystemCall::~SystemCall ( )
virtualdefault

Destroy the instance.

Member Function Documentation

◆ data() [1/4]

virtual std::shared_ptr< const void > introvirt::SystemCall::data ( const std::string &  key) const
pure virtual

Retrieve arbitrary data stored with the SystemCall.

This can be used to retrieve arbitrary stored data.

Parameters
keyThe name of the value to retrieve
Returns
The data that was stored, or nullptr if the key was not found.

This is the const version.

◆ data() [2/4]

virtual std::shared_ptr< void > introvirt::SystemCall::data ( const std::string &  key)
pure virtual

Retrieve arbitrary data stored with the SystemCall.

This can be used to retrieve arbitrary stored data.

Parameters
keyThe name of the value to retrieve
Returns
The data that was stored, or nullptr if the key was not found.

◆ data() [3/4]

virtual void introvirt::SystemCall::data ( const std::string &  key,
const std::shared_ptr< void > &  value 
)
pure virtual

Store arbitrary data with the SystemCall.

This can be useful for storing data when handling the system call, and retreiving it when the call returns.

Parameters
keyThe name of the value to store
valueThe data to store

◆ data() [4/4]

virtual void introvirt::SystemCall::data ( const std::string &  key,
std::shared_ptr< void > &&  value 
)
pure virtual

Store arbitrary data with the SystemCall.

This can be useful for storing data when handling the system call, and retreiving it when the call returns.

Parameters
keyThe name of the value to store
valueThe data to store

◆ handle_return_event()

virtual void introvirt::SystemCall::handle_return_event ( Event event)
pure virtual

Handle a system call return event.

Parameters
eventThe system call return event

◆ json()

virtual Json::Value introvirt::SystemCall::json ( ) const
pure virtual
Returns
a JSON representation of the system call

◆ name()

virtual const std::string & introvirt::SystemCall::name ( ) const
pure virtual

Get the name of the system call.

Returns
The name of the system call as a string

◆ supported()

virtual bool introvirt::SystemCall::supported ( ) const
pure virtual

Check if this system call is supported by a more specific handler.

Returns
true If there is a derived class supporting this system call
false If there is no system call handler for the current call

◆ will_return()

virtual bool introvirt::SystemCall::will_return ( ) const
pure virtual
Returns
True if this call will return

◆ write()

virtual void introvirt::SystemCall::write ( std::ostream &  os = std::cout) const
pure virtual

Write a human-readable description of this system call.

Parameters
osThe stream to write to

The documentation for this class was generated from the following file: