aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/utils/addr2name.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/addr2name.cpp')
-rw-r--r--utils/addr2name.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/utils/addr2name.cpp b/utils/addr2name.cpp
index 611e02b..5a8cbc3 100644
--- a/utils/addr2name.cpp
+++ b/utils/addr2name.cpp
@@ -62,17 +62,19 @@ void dump_error(const std::exception& e) {
std::cerr << "error: " << e.what() << '\n';
}
-void resolve_symbol(const winapi::Repo& repo, winapi::Address address, bool lines = false) {
+void resolve_symbol(const winapi::PostMortem& analysis,
+ winapi::Address address,
+ bool lines = false) {
try {
- const auto symbol = repo.resolve_symbol(address);
- const auto& module = repo.module_with_offline_base(symbol.get_offline_base());
+ const auto symbol = analysis.resolve_symbol(address);
+ const auto& module = analysis.module_with_offline_base(symbol.get_offline_base());
std::ostringstream msg;
msg << format_symbol(module, symbol);
if (lines) {
try {
- const auto line_info = repo.resolve_line(address);
+ const auto line_info = analysis.resolve_line(address);
msg << ' ' << format_line_info(line_info);
} catch (const std::exception& e) {
dump_error(e);
@@ -104,13 +106,13 @@ int main(int argc, char* argv[]) {
return 0;
}
- winapi::Repo repo;
+ winapi::PostMortem analysis;
for (const auto& pdb : settings.pdbs)
- repo.add_pdb(pdb.online_base, pdb.path);
+ analysis.add_pdb(pdb.online_base, pdb.path);
for (const auto& address : settings.addresses)
- resolve_symbol(repo, address, settings.lines);
+ resolve_symbol(analysis, address, settings.lines);
} catch (const std::exception& e) {
dump_error(e);
return 1;