From e162f2a21632e3f7b1c7ab9dd7b530beb1f2d4a8 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 29 May 2021 01:24:29 +0300 Subject: rename class Repo to PostMortem --- include/winapi/debug/post_mortem.hpp | 58 ++++++++++++++++++++++++++++++++++++ include/winapi/debug/repo.hpp | 58 ------------------------------------ 2 files changed, 58 insertions(+), 58 deletions(-) create mode 100644 include/winapi/debug/post_mortem.hpp delete mode 100644 include/winapi/debug/repo.hpp (limited to 'include/winapi/debug') diff --git a/include/winapi/debug/post_mortem.hpp b/include/winapi/debug/post_mortem.hpp new file mode 100644 index 0000000..bf4ad83 --- /dev/null +++ b/include/winapi/debug/post_mortem.hpp @@ -0,0 +1,58 @@ +// Copyright (c) 2017 Egor Tensin +// 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.hpp" +#include "module.hpp" +#include "symbol.hpp" + +#include + +#include +#include +#include +#include + +namespace winapi { + +class PostMortem { +public: + PostMortem() = default; + + Address add_pdb(Address online_base, const std::string& path); + + typedef std::function OnSymbol; + void enum_symbols(const OnSymbol&) const; + void enum_symbols(Address offline_base, const OnSymbol&) const; + void enum_symbols(const Module&, const OnSymbol&) const; + + Symbol resolve_symbol(Address) const; + Symbol resolve_symbol(const std::string&) const; + + LineInfo resolve_line(Address) const; + + const Module& module_with_online_base(Address) const; + const Module& module_with_offline_base(Address) const; + +private: + Symbol symbol_from_buffer(const SymbolInfo&) const; + static Symbol symbol_from_buffer(const Module&, const SymbolInfo&); + + const Module& module_from_online_address(Address) const; + const Module& module_from_offline_address(Address) const; + + Address address_offline_to_online(Address) const; + Address address_online_to_offline(Address) const; + + const DbgHelp dbghelp{DbgHelp::post_mortem()}; + + std::unordered_set file_ids; + std::map online_bases; + std::map offline_bases; +}; + +} // namespace winapi diff --git a/include/winapi/debug/repo.hpp b/include/winapi/debug/repo.hpp deleted file mode 100644 index 8ee7fde..0000000 --- a/include/winapi/debug/repo.hpp +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2017 Egor Tensin -// 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.hpp" -#include "module.hpp" -#include "symbol.hpp" - -#include - -#include -#include -#include -#include - -namespace winapi { - -class Repo { -public: - Repo() = default; - - Address add_pdb(Address online_base, const std::string& path); - - typedef std::function OnSymbol; - void enum_symbols(const OnSymbol&) const; - void enum_symbols(Address offline_base, const OnSymbol&) const; - void enum_symbols(const Module&, const OnSymbol&) const; - - Symbol resolve_symbol(Address) const; - Symbol resolve_symbol(const std::string&) const; - - LineInfo resolve_line(Address) const; - - const Module& module_with_online_base(Address) const; - const Module& module_with_offline_base(Address) const; - -private: - Symbol symbol_from_buffer(const SymbolInfo&) const; - static Symbol symbol_from_buffer(const Module&, const SymbolInfo&); - - const Module& module_from_online_address(Address) const; - const Module& module_from_offline_address(Address) const; - - Address address_offline_to_online(Address) const; - Address address_online_to_offline(Address) const; - - const DbgHelp dbghelp{DbgHelp::post_mortem()}; - - std::unordered_set file_ids; - std::map online_bases; - std::map offline_bases; -}; - -} // namespace winapi -- cgit v1.2.3