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)
commit3838115b52b17f0eb97ddbca51b40162c0333cdb
treecf76e56b0f6b204f9739b5fcfd0e1925c09fec1b
parentfcdf647e02be76dcca15e015e2ddfe01b4e86155
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

Commit migrated from https://github.com/dotnet/coreclr/commit/06ff0ff180dc0aa512481e5e4885b1f16e785a81
src/coreclr/src/pal/src/CMakeLists.txt
src/coreclr/src/pal/src/init/pal.cpp