Introspection API

Note:
All functions that take a pid64_t (64-bit) parameter also accept a pid_t (32-bit) value, where:
pid = (pid_t)pid64;
pid64 = getpid64(pid);

Refer to getpid64() for more information.

This chapter describes the introspection APIs defined in the introspection.h header file. Its corresponding static library, libintrospection, wraps the following kernel messages:
Function Kernel message devctl() command or operation
introspection_allocate_and_get_all_child_pids() type: _PROC_GET_ALL_CHILD_PID N/A
introspection_allocate_and_get_all_pids() type: _PROC_GET_ALL_PID opendir("/proc"), readdir()
introspection_get_all_child_pids() type: _PROC_GET_ALL_CHILD_PID N/A
introspection_get_all_pids() type: _PROC_GET_ALL_PID opendir("/proc"), readdir()
introspection_get_floatingpoint_regs() type: _PROC_DEBUG

subtype: _PROC_DEBUG_GET_FP_REGS

DCMD_PROC_GETFPREG
introspection_get_generalpurpose_regs() type: _PROC_DEBUG

subtype: _PROC_DEBUG_GET_GENERAL_REGS

DCMD_PROC_GETGREG
introspection_get_mapped_object_path() type: _MEM_MAP_INFO

subtype: _MEM_MAP_INFO_OBJECT_PATH

DCMD_PROC_MAPDEBUG
introspection_get_pagetableinfo() type: _MEM_MAP_INFO

subtype: _MEM_MAP_INFO_PAGETABLE

DCMD_PROC_PTINFO
introspection_get_physical_regions() type: _MEM_MAP_INFO

subtype: _MEM_MAP_INFO_PHYSICAL

DCMD_PROC_PAGEDATA
introspection_get_proc_info() type: _PROC_DEBUG

subtype: _PROC_DEBUG_PROC_INFO

DCMD_PROC_INFO
introspection_get_process_name() type: _PROC_GETNAME DCMD_PROC_MAPDEBUG_BASE
introspection_get_thread_status() type: _PROC_DEBUG

subtype: _PROC_DEBUG_THREAD_STATUS

DCMD_PROC_TIDSTATUS
introspection_get_virtual_regions() type: _MEM_MAP_INFO

subtype: _MEM_MAP_INFO_VIRTUAL

N/A
introspection_read_process_memory() type: _MEM_READ_MEM

subtype: 0

open("/proc/pid/as"), lseek(), read();
N/A type: _PROC_COREDUMP

subtype: _PROC_COREDUMP_REGISTER_EVENT

N/A
N/A type: _PROC_COREDUMP

subtype: _PROC_COREDUMP_CONT_TERM

N/A
Page updated: