diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2017-05-20 19:35:37 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2017-05-20 19:35:37 +0300 |
commit | f3bac940189c50e7fc2bdb8743a6524e5afa74fd (patch) | |
tree | 70011a946699c0c14d16c5b8f77da08039e91ece /utils | |
parent | refactoring (diff) | |
download | winapi-debug-f3bac940189c50e7fc2bdb8743a6524e5afa74fd.tar.gz winapi-debug-f3bac940189c50e7fc2bdb8743a6524e5afa74fd.zip |
addr2name: include module names
Diffstat (limited to '')
-rw-r--r-- | utils/addr2name.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/utils/addr2name.cpp b/utils/addr2name.cpp index 5342705..d611bac 100644 --- a/utils/addr2name.cpp +++ b/utils/addr2name.cpp @@ -65,10 +65,10 @@ namespace bool help_flag = false; }; - std::string format_symbol(const pdb::Symbol& symbol) + std::string format_symbol(const pdb::Module& module, const pdb::Symbol& symbol) { std::ostringstream oss; - oss << symbol.get_name(); + oss << module.get_name() << '!' << symbol.get_name(); const auto displacement = symbol.get_displacement(); if (displacement) oss << '+' << pdb::format_address(displacement); @@ -84,7 +84,9 @@ namespace { try { - std::cout << format_symbol(repo.resolve_symbol(address)) << '\n'; + const auto symbol = repo.resolve_symbol(address); + const auto& module = repo.module_with_offline_base(symbol.get_offline_base()); + std::cout << format_symbol(module, symbol) << '\n'; } catch (const std::exception& e) { |