libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
introvirt::windows::SystemCallConverter Class Referencefinal

Class for converting between native system call numbers and our SystemCall values. More...

#include <SystemCallConverter.hh>

Public Member Functions

SystemCallIndex normalize (uint32_t index) const
 Normalize a system call.
 
uint32_t native (SystemCallIndex index) const
 Convert a normalized system call into the native value.
 
uint32_t count () const
 Get the number of system calls detected in the guest.
 
 SystemCallConverter (const WindowsGuest &guest)
 Construct a new System Call Table object.
 
 ~SystemCallConverter ()
 Destroy the instance.
 

Static Public Attributes

static constexpr uint64_t SystemCallIndexMask = 0x1FFF
 A mask used for normalizing system calls.
 

Detailed Description

Class for converting between native system call numbers and our SystemCall values.

Windows changes around the system call numbers between builds. This class is used to convert between the native values and our "normalized" values.

Constructor & Destructor Documentation

◆ SystemCallConverter()

introvirt::windows::SystemCallConverter::SystemCallConverter ( const WindowsGuest guest)

Construct a new System Call Table object.

Parameters
guestThe guest to detect call numbers for
Exceptions
GuestDetectionExceptionif we fail to detect call numbers for the guest

◆ ~SystemCallConverter()

introvirt::windows::SystemCallConverter::~SystemCallConverter ( )

Destroy the instance.

Member Function Documentation

◆ count()

uint32_t introvirt::windows::SystemCallConverter::count ( ) const

Get the number of system calls detected in the guest.

Returns
The number of system calls that we've detected
Examples
ivguestinfo.cc.

◆ native()

uint32_t introvirt::windows::SystemCallConverter::native ( SystemCallIndex  index) const

Convert a normalized system call into the native value.

Windows system call numbers change between builds. To handle that, we have to normalize them to our own representation.

Parameters
indexThe SystemCallIndex value to convert
Returns
A raw system call index, or 0xFFFFFFFF if the guest does not support the call

◆ normalize()

SystemCallIndex introvirt::windows::SystemCallConverter::normalize ( uint32_t  index) const

Normalize a system call.

Windows system call numbers change between builds. To handle that, we have to normalize them to our own representation.

Parameters
indexThe raw index used by the guest
Returns
A normalized system call

Member Data Documentation

◆ SystemCallIndexMask

constexpr uint64_t introvirt::windows::SystemCallConverter::SystemCallIndexMask = 0x1FFF
staticconstexpr

A mask used for normalizing system calls.

System call numbers can have extra information, this mask is used to get the call index itself.


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