From bc78e3308f8bf74a8935f9ef8fd28825d6b48c2f Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 29 May 2021 01:33:39 +0300 Subject: move _address functions to winapi::address --- utils/addr2name.cpp | 4 ++-- utils/name2addr.cpp | 2 +- utils/pdb_descr.hpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'utils') diff --git a/utils/addr2name.cpp b/utils/addr2name.cpp index 5a8cbc3..333ef29 100644 --- a/utils/addr2name.cpp +++ b/utils/addr2name.cpp @@ -48,7 +48,7 @@ std::string format_symbol(const winapi::Module& module, const winapi::Symbol& sy oss << module.get_name() << '!' << symbol.get_name(); const auto displacement = symbol.get_displacement(); if (displacement) - oss << '+' << winapi::format_address(displacement); + oss << '+' << winapi::address::format(displacement); return oss.str(); } @@ -84,7 +84,7 @@ void resolve_symbol(const winapi::PostMortem& analysis, std::cout << msg.str() << '\n'; } catch (const std::exception& e) { dump_error(e); - std::cout << winapi::format_address(address) << '\n'; + std::cout << winapi::address::format(address) << '\n'; } } diff --git a/utils/name2addr.cpp b/utils/name2addr.cpp index c113a9a..105b94e 100644 --- a/utils/name2addr.cpp +++ b/utils/name2addr.cpp @@ -45,7 +45,7 @@ void dump_error(const std::exception& e) { void resolve_symbol(const winapi::PostMortem& analysis, const std::string& name) { try { const auto address = analysis.resolve_symbol(name).get_online_address(); - std::cout << winapi::format_address(address) << '\n'; + std::cout << winapi::address::format(address) << '\n'; } catch (const std::exception& e) { dump_error(e); std::cout << name << '\n'; diff --git a/utils/pdb_descr.hpp b/utils/pdb_descr.hpp index 5925b93..e00020f 100644 --- a/utils/pdb_descr.hpp +++ b/utils/pdb_descr.hpp @@ -25,7 +25,7 @@ struct PDB { boost::throw_exception(boost::program_options::invalid_option_value{src}); winapi::Address online_base; - if (!winapi::parse_address(online_base, src.substr(0, sep_pos))) + if (!winapi::address::parse(online_base, src.substr(0, sep_pos))) boost::throw_exception(boost::program_options::invalid_option_value{src}); return {online_base, src.substr(sep_pos + 1)}; @@ -33,7 +33,7 @@ struct PDB { static winapi::Address parse_address(const std::string& src) { winapi::Address dest; - if (!winapi::parse_address(dest, src)) + if (!winapi::address::parse(dest, src)) boost::throw_exception(boost::program_options::invalid_option_value{src}); return dest; } -- cgit v1.2.3