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/address.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/address.hpp')
| -rw-r--r-- | include/pdb/address.hpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/include/pdb/address.hpp b/include/pdb/address.hpp deleted file mode 100644 index 3d7acd6..0000000 --- a/include/pdb/address.hpp +++ /dev/null @@ -1,34 +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 <windows.h> - -#include <sstream> -#include <string> - -namespace pdb { - -typedef DWORD64 Address; - -inline std::string format_address(Address address) { - std::ostringstream oss; - oss << std::hex << std::showbase << address; - return oss.str(); -} - -inline std::string format_address(void* address) { - return format_address(reinterpret_cast<Address>(address)); -} - -inline bool parse_address(Address& dest, const std::string& src) { - std::istringstream iss{src}; - iss >> std::hex; - char c; - return iss >> dest && !iss.get(c); -} - -} // namespace pdb |
