class ProcessSymbols

Defined at line 39 of file ../../src/developer/debug/zxdb/symbols/process_symbols.h

Main client interface for querying process symbol information. This requires a running process

and returns real addresses. See also TargetSymbols.

This class is a collection for modules. As such, it's not very useful to mock. Instead, mock the

ModuleSymbols and add them to this ProcessSymbols class (see ProcessSymbolsTestSetup helper

class).

Public Methods

void ProcessSymbols (Notifications * notifications, TargetSymbols * target_symbols)

The passed-in pointers must outlive this class.

Defined at line 29 of file ../../src/developer/debug/zxdb/symbols/process_symbols.cc

void ~ProcessSymbols ()

Defined at line 32 of file ../../src/developer/debug/zxdb/symbols/process_symbols.cc

fxl::WeakPtr<const ProcessSymbols> GetWeakPtr ()

Defined at line 34 of file ../../src/developer/debug/zxdb/symbols/process_symbols.cc

void SetModules (const std::vector<debug_ipc::Module> & modules, bool force_reload_symbols)

Replaces all modules with the given list.

Defined at line 38 of file ../../src/developer/debug/zxdb/symbols/process_symbols.cc

TargetSymbols * target_symbols ()

Defined at line 61 of file ../../src/developer/debug/zxdb/symbols/process_symbols.h

const TargetSymbols * target_symbols ()

Defined at line 62 of file ../../src/developer/debug/zxdb/symbols/process_symbols.h

void RetryLoadBuildID (const std::string & name, const std::string & build_id, DebugSymbolFileType file_type)

Try to load the symbols for a given build ID again, presumably because we have downloaded them

and now expect the index to hit.

The module name can be empty if no local lookup is needed, it follows the same rules as

SystemSymbols::GetModule().

Defined at line 255 of file ../../src/developer/debug/zxdb/symbols/process_symbols.cc

void InjectModuleForTesting (const std::string & name, const std::string & build_id, std::unique_ptr<LoadedModuleSymbols> mod_sym)

Appends the ModuleSymbols implementation to the current list (unlike SetModules which does a

replacement). This is typically used to populate a ProcessSymbols with one or more

MockModuleSymbols for testing purposes.

Defined at line 111 of file ../../src/developer/debug/zxdb/symbols/process_symbols.cc

std::vector<ModuleSymbolStatus> GetStatus ()

Returns statistics on the currently-loaded modules.

Defined at line 128 of file ../../src/developer/debug/zxdb/symbols/process_symbols.cc

std::vector<const LoadedModuleSymbols *> GetLoadedModuleSymbols ()

Returns the information for all the modules that were loaded with symbol information.

Defined at line 150 of file ../../src/developer/debug/zxdb/symbols/process_symbols.cc

const LoadedModuleSymbols * GetLoadedForModuleSymbols (const ModuleSymbols * mod_sym)

Returns the instance of the LoadedModuleSymbols for the given ModuleSymbols if it's currently

loaded in the process. Returns null otherwise.

Defined at line 160 of file ../../src/developer/debug/zxdb/symbols/process_symbols.cc

const LoadedModuleSymbols * GetModuleForAddress (uint64_t address)

Finds the module for the given address. Returns null if the address does not correspond to

loaded code in any module.

Defined at line 169 of file ../../src/developer/debug/zxdb/symbols/process_symbols.cc

LoadedModuleSymbols * GetModuleForAddress (uint64_t address)

Defined at line 176 of file ../../src/developer/debug/zxdb/symbols/process_symbols.cc

std::vector<Location> ResolveInputLocation (const InputLocation & input_location, const ResolveOptions & options)

Converts the given InputLocation into one or more locations. The input can match zero, one, or

many locations.

If symbolize is true, the results will be symbolized, otherwise the output locations will be

regular addresses (this will be slightly faster).

Defined at line 181 of file ../../src/developer/debug/zxdb/symbols/process_symbols.cc

LineDetails LineDetailsForAddress (uint64_t address, bool greedy)

Computes the line that corresponds to the given address. Unlike ResolveInputLocation (which

just returns the current source line), this returns the entire set of contiguous line table

entries with code ranges with the same line as the given address.

The |greedy| flag will also include "line 0" line table entries (see

ModuleSymbols::LineDetailsForAddress() for more).

Defined at line 215 of file ../../src/developer/debug/zxdb/symbols/process_symbols.cc

Records