NetBSD: Add support for PAL_IsDebuggerPresent()
authorKamil Rytarowski <n54@gmx.com>
Fri, 15 Apr 2016 11:23:31 +0000 (13:23 +0200)
committerKamil Rytarowski <n54@gmx.com>
Fri, 15 Apr 2016 22:05:23 +0000 (00:05 +0200)
commit06ff0ff180dc0aa512481e5e4885b1f16e785a81
treefe82538a32bc5aa0236f26d058edb6a7353949a6
parent6ccefb7afd1c3fd96caf3d6694d6e9441c36362b
NetBSD: Add support for PAL_IsDebuggerPresent()

Reuse the kvm(3) interface to grab "struct kinfo_proc".

NAME
     kvm - kernel memory interface

LIBRARY
     Kernel Data Access Library (libkvm, -lkvm)

DESCRIPTION
     The kvm library provides a uniform interface for accessing kernel virtual
     memory images, including live systems and crash dumps.  Access to live
     systems is via /dev/mem while crash dumps can be examined via the core
     file generated by savecore(8).  The interface behaves identically in both
     cases.  Memory can be read and written, kernel symbol addresses can be
     looked up efficiently, and information about user processes can be
     gathered.

     kvm_open() is first called to obtain a descriptor for all subsequent
     calls
src/pal/src/CMakeLists.txt
src/pal/src/init/pal.cpp