When performing a debug build, the "deadlock plugin" will be included
in the build, which uses the thread functionality of the std. However,
during compiling there would be an error about a symbol in thread.hpp
not being found (_beginthreadex). As it turns out, this was due to us
having a header file called Process.h, which would shadow the windows-
specific header file defining the mentioned symbol.
Therefore, in this commit we rename the Process base class to
AbstractProcess and rename the files accordingly, fixing that error.
See also: https://stackoverflow.com/q/27230258
Since most of the functions are already using C++, why not use classes as well?
This commit introduces the following classes:
- HostLinux: can only be compiled on Linux.
Implements peek() and module().
- HostWindows: can only be compiled on Windows.
Implements peek() and module().
- Process: abstract (cannot be instantiated directly).
Inherits from HostLinux on Linux and from HostWindows on Windows.
Provides functions that can be used with both Linux and Windows processes.
Pure virtual functions are implemented in the following classes:
- ProcessLinux: meant to be used with Linux processes, inherits from Process.
Only implements exportedSymbol(), due to the other functions being universal.
The constructor detects the architecture through the ELF header.
- ProcessWindows: meant to be used with Windows processes, inherits from Process.
Only implements exportedSymbol(), due to the other functions being universal.
The constructor detects the architecture through the NT header.