Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavide Beatrici <git@davidebeatrici.dev>2020-11-06 23:37:06 +0300
committerDavide Beatrici <git@davidebeatrici.dev>2020-11-06 23:37:06 +0300
commit988b8417acfc4ca4b19283afe7e1973d05a39be8 (patch)
tree160e79e9d7dc57ac27e02279775ea29418a537ae /plugins/HostWindows.h
parenta3480a2a6b432b247821add175f725714692ef1e (diff)
REFAC(positional-audio): Proper functions/classes for module-related operations
Previously, only module() was present: it retrieved the base address of the specified module. It worked fine, but it iterated through the process' modules every time it was called. This commit replaces it with modules(), which returns an std::unordered_map containing all modules. The map uses the module name as key and Module as value. Aside from the performance improvement, the new code also provides info for each module region: - Start address. - Size. - Whether it's readable, writable and/or executable.
Diffstat (limited to 'plugins/HostWindows.h')
-rw-r--r--plugins/HostWindows.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/HostWindows.h b/plugins/HostWindows.h
index b42c1dbc1..06a344b43 100644
--- a/plugins/HostWindows.h
+++ b/plugins/HostWindows.h
@@ -6,12 +6,9 @@
#ifndef HOSTWINDOWS_H_
#define HOSTWINDOWS_H_
-#include <cstddef>
-#include <cstdint>
-#include <string>
+#include "Module.h"
typedef uint32_t procid_t;
-typedef uint64_t procptr_t;
class HostWindows {
protected:
@@ -19,7 +16,7 @@ protected:
public:
bool peek(const procptr_t address, void *dst, const size_t size) const;
- procptr_t module(const std::string &module) const;
+ Modules modules() const;
HostWindows(const procid_t pid);
virtual ~HostWindows();