diff options
| author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-05-29 01:03:28 +0300 |
|---|---|---|
| committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-05-29 01:03:28 +0300 |
| commit | a38dacc6489ff3c7a0748a01ed7cc2bd0cdaaa7c (patch) | |
| tree | de48e7d8b3f9d66c9e11dd048ac9062921b05801 /include/pdb/module.hpp | |
| parent | add .clang-tidy, `make check` (diff) | |
| download | winapi-debug-a38dacc6489ff3c7a0748a01ed7cc2bd0cdaaa7c.tar.gz winapi-debug-a38dacc6489ff3c7a0748a01ed7cc2bd0cdaaa7c.zip | |
include/pdb/ -> include/winapi/debug/
Diffstat (limited to 'include/pdb/module.hpp')
| -rw-r--r-- | include/pdb/module.hpp | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/include/pdb/module.hpp b/include/pdb/module.hpp deleted file mode 100644 index 5cfa69d..0000000 --- a/include/pdb/module.hpp +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2017 Egor Tensin <Egor.Tensin@gmail.com> -// This file is part of the "winapi-debug" project. -// For details, see https://github.com/egor-tensin/winapi-debug. -// Distributed under the MIT License. - -#pragma once - -#include "address.hpp" - -#include <dbghelp.h> -#include <windows.h> - -#include <string> - -namespace pdb { - -class ModuleInfo { -public: - typedef IMAGEHLP_MODULEW64 Impl; - - ModuleInfo(); - explicit ModuleInfo(const Impl& impl); - - explicit operator Impl&() { return impl; } - explicit operator const Impl&() const { return impl; } - - Address get_offline_base() const { return impl.BaseOfImage; } - - std::string get_name() const; - -private: - static Impl create_impl(); - - Impl impl; -}; - -class Module : public ModuleInfo { -public: - Module(Address online_base, const ModuleInfo& info) - : ModuleInfo{info}, online_base{online_base} {} - - Address get_online_base() const { return online_base; } - - Address translate_offline_address(Address offline) const; - Address translate_online_address(Address online) const; - -private: - std::string invalid_offline_address(Address offline) const; - std::string invalid_online_address(Address online) const; - - const Address online_base; -}; - -} // namespace pdb |
