From 3fe8fe7f326bf1a5e5fa9caedabe2fe79f7ac10c Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 15 Jan 2020 11:50:12 +0300 Subject: enum_symbols: use DbgHelp instead of Repo --- utils/enum_symbols.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/utils/enum_symbols.cpp b/utils/enum_symbols.cpp index dad5300..87cc56a 100644 --- a/utils/enum_symbols.cpp +++ b/utils/enum_symbols.cpp @@ -5,7 +5,6 @@ #include "command_line.hpp" #include "pdb/all.hpp" -#include "pdb_descr.hpp" #include @@ -21,8 +20,9 @@ public: explicit EnumSymbols(const std::string& argv0) : SettingsParser{argv0} { namespace po = boost::program_options; - visible.add_options()( - "pdb", po::value>(&pdbs)->value_name("ADDR,PATH"), "load a PDB file"); + visible.add_options()("pdb", + po::value>(&pdbs)->value_name("PATH"), + "load a PDB file"); visible.add_options()( "functions", po::value(&tag)->implicit_value(function_tag)->zero_tokens(), @@ -30,10 +30,10 @@ public: } const char* get_short_description() const override { - return "[-h|--help] [--pdb ADDR,PATH]... [--functions]"; + return "[-h|--help] [--pdb PATH]... [--functions]"; } - std::vector pdbs; + std::vector pdbs; bool type_specified() const { return tag != reserved_tag; } @@ -67,12 +67,12 @@ int main(int argc, char* argv[]) { return 0; } - pdb::Repo repo; + pdb::DbgHelp dbghelp; for (const auto& pdb : settings.pdbs) { - const auto id = repo.add_pdb(pdb.online_base, pdb.path); + const auto id = dbghelp.load_pdb(pdb); - repo.enum_symbols(id, [&](const pdb::Symbol& symbol) { + dbghelp.enum_symbols(id, [&](const pdb::SymbolInfo& symbol) { if (!settings.type_specified() || settings.get_type() == symbol.get_type()) std::cout << symbol.get_name() << '\n'; }); -- cgit v1.2.3