class ProcessSymbolsTestSetup
Defined at line 24 of file ../../src/developer/debug/zxdb/symbols/process_symbols_test_setup.h
This class sets up a ProcessSymbols for testing purposes. It allows MockModuleSymbols to be
easily injected into the process.
This class is only useful for tests that use the symbol system but not the client objects
(Process/Target, etc.).
Public Members
static const uint64_t kDefaultLoadAddress
Public Methods
void ProcessSymbolsTestSetup ()
Defined at line 12 of file ../../src/developer/debug/zxdb/symbols/process_symbols_test_setup.cc
void ~ProcessSymbolsTestSetup ()
Defined at line 18 of file ../../src/developer/debug/zxdb/symbols/process_symbols_test_setup.cc
void InjectModule (const std::string & name, const std::string & build_id, uint64_t base, fxl::RefPtr<ModuleSymbols> mod_sym)
Appends the given module symbols implementation to the process. This will
typically be a MockModuleSymbols.
Defined at line 20 of file ../../src/developer/debug/zxdb/symbols/process_symbols_test_setup.cc
MockModuleSymbols * InjectMockModule ()
Injects a module at the address kDefaultLoadAddress, returning a pointer to it. The returned
pointer will be owned by the symbol system associated with the process().
Most callers only need one module, want to use the standard mock, and don't care about the
particular name or load address. This uses some defaults to make injection simpler.
This function should be called at most once.
Defined at line 27 of file ../../src/developer/debug/zxdb/symbols/process_symbols_test_setup.cc
SystemSymbols & system ()
Defined at line 29 of file ../../src/developer/debug/zxdb/symbols/process_symbols_test_setup.h
TargetSymbols & target ()
Defined at line 30 of file ../../src/developer/debug/zxdb/symbols/process_symbols_test_setup.h
ProcessSymbols & process ()
Defined at line 31 of file ../../src/developer/debug/zxdb/symbols/process_symbols_test_setup.h