KittyMemoryEx 1.0.0
Dedicated library for runtime code patching, memory scanning, tracing, injection and some more useful memory utilities. works for both Android and Linux
Loading...
Searching...
No Matches
KittyPerfTrap Class Reference

Class to manage trap signaling hardware watchpoins. More...

#include <KittyPerfEvent.hpp>

Inheritance diagram for KittyPerfTrap:
Collaboration diagram for KittyPerfTrap:

Public Member Functions

bool add (pid_t tid, uintptr_t addr, KT_WATCH_TYPE bp_type, KT_WATCH_LEN bp_len)
 Adds a new trap signaling hardware watchpoint to the watch list.
Public Member Functions inherited from KittyPerfWatch
bool add (pid_t tid, uintptr_t addr, KT_WATCH_TYPE bp_type, KT_WATCH_LEN bp_len)
 Adds a new hardware watchpoint to the watch list.
void poll (int timeout_ms, const std::function< bool(const KittyPerfSample &)> &cb)
 Polls the watch list for new samples.
void clear ()
 Clears all watchpoints from the watch list.

Additional Inherited Members

Protected Member Functions inherited from KittyPerfWatch
bool enable ()
bool disable ()
void consumeRecord (const WatchInfo &w, KittyPerfSample *out)
void pollOnce (int timeout_ms, KittyPerfSample *out)
Static Protected Member Functions inherited from KittyPerfWatch
static int perf_event_open (struct perf_event_attr *attr, pid_t pid, int cpu, int group_fd, unsigned long flags)
Protected Attributes inherited from KittyPerfWatch
std::vector< WatchInfo > _watches

Detailed Description

Class to manage trap signaling hardware watchpoins.

Member Function Documentation

◆ add()

bool KittyPerfTrap::add ( pid_t tid,
uintptr_t addr,
KT_WATCH_TYPE bp_type,
KT_WATCH_LEN bp_len )

Adds a new trap signaling hardware watchpoint to the watch list.

Parameters
tidThe thread ID to attach the watchpoint to.
addrThe address to watch.
bp_typeThe type of watchpoint (read, write, or read/write).
bp_lenThe length of the watchpoint in bytes.
Returns
True if the watchpoint was added successfully, false otherwise.

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