DebugServer2
Loading...
Searching...
No Matches
Headers
DebugServer2
Host
Darwin
LibProc.h
1
//
2
// Copyright (c) 2015, Jakub Klama <jakub@ixsystems.com>
3
// All rights reserved.
4
//
5
// This source code is licensed under the University of Illinois/NCSA Open
6
// Source License found in the LICENSE file in the root directory of this
7
// source tree. An additional grant of patent rights can be found in the
8
// PATENTS file in the same directory.
9
//
10
11
#pragma once
12
13
#include "DebugServer2/Target/ThreadBase.h"
14
#include "DebugServer2/Types.h"
15
16
#include <cstdio>
17
#include <dirent.h>
18
#include <fcntl.h>
19
#include <functional>
20
#include <unistd.h>
21
22
#include <sys/stat.h>
23
24
namespace
ds2 {
25
namespace
Host {
26
namespace
Darwin {
27
28
class
LibProc
{
29
public
:
30
static
bool
GetProcessInfo(ProcessId pid,
ProcessInfo
&info);
31
static
void
32
EnumerateProcesses(
bool
allUsers, UserId
const
&uid,
33
std::function<
void
(pid_t pid, uid_t uid)>
const
&cb);
34
static
std::string GetThreadName(
ProcessThreadId
const
&ptid);
35
static
const
char
*GetExecutablePath(ProcessId pid);
36
};
37
}
// namespace Darwin
38
}
// namespace Host
39
}
// namespace ds2
ds2::Host::Darwin::LibProc
Definition
LibProc.h:28
ds2::ProcessInfo
Definition
Types.h:263
ds2::ProcessThreadId
Definition
Types.h:57
Generated by
1.12.0