aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/pdb
diff options
context:
space:
mode:
Diffstat (limited to 'include/pdb')
-rw-r--r--include/pdb/all.hpp1
-rw-r--r--include/pdb/process.hpp32
2 files changed, 33 insertions, 0 deletions
diff --git a/include/pdb/all.hpp b/include/pdb/all.hpp
index 36a68d3..0794362 100644
--- a/include/pdb/all.hpp
+++ b/include/pdb/all.hpp
@@ -11,6 +11,7 @@
#include "error.hpp"
#include "handle.hpp"
#include "module.hpp"
+#include "process.hpp"
#include "repo.hpp"
#include "symbol.hpp"
#include "utils/file.hpp"
diff --git a/include/pdb/process.hpp b/include/pdb/process.hpp
new file mode 100644
index 0000000..3ddb6b4
--- /dev/null
+++ b/include/pdb/process.hpp
@@ -0,0 +1,32 @@
+#pragma once
+
+#include "handle.hpp"
+
+#include <windows.h>
+
+#include <string>
+
+namespace pdb {
+
+class Process {
+public:
+ using ID = DWORD;
+
+ static Process current();
+ static Process open(ID);
+
+ ID get_id() const { return id; }
+
+ const Handle& get_handle() const { return handle; }
+
+ std::string get_executable_path() const;
+
+private:
+ explicit Process(Handle&&);
+ Process(ID, Handle&&);
+
+ ID id;
+ Handle handle;
+};
+
+} // namespace pdb