class SystemSymbols

Defined at line 27 of file ../../src/developer/debug/zxdb/symbols/system_symbols.h

Tracks a global view of all ModuleSymbols objects. Since each object is independent of load

address, we can share these between processes that load the same binary.

This is an internal object but since there is no public API, there is no "Impl" split.

Public Methods

BuildIDIndex & build_id_index ()

Defined at line 42 of file ../../src/developer/debug/zxdb/symbols/system_symbols.h

void set_create_index (bool val)

Whether to create index on ModuleSymbols. The index is used during symbol name to address

lookups. If you don't need this feature, disabling it will accelerate the loading time.

Defined at line 46 of file ../../src/developer/debug/zxdb/symbols/system_symbols.h

void set_enable_local_fallback (bool enable)

Set to true to fallback for symbol searching by looking for absolute module paths on the

local system

Defined at line 50 of file ../../src/developer/debug/zxdb/symbols/system_symbols.h

void SystemSymbols (RequestDownloadFunction f)

Defined at line 55 of file ../../src/developer/debug/zxdb/symbols/system_symbols.cc

void ~SystemSymbols ()

Defined at line 58 of file ../../src/developer/debug/zxdb/symbols/system_symbols.cc

void InjectModuleForTesting (const std::string & build_id, ModuleSymbols * module)

Injects a ModuleSymbols object for the given build ID. Used for testing. Normally the test

would provide a dummy implementation for ModuleSymbols.

Defined at line 60 of file ../../src/developer/debug/zxdb/symbols/system_symbols.cc

Err GetModule (const std::string & name, const std::string & build_id, bool force_reload_symbols, fxl::RefPtr<ModuleSymbols> * module, DownloadType download_type)

Retrieves the symbols for the module with the given name and build ID. If the module's symbols

have already been loaded, just puts an owning reference into the given out param. If not, the

symbols will be loaded.

The build ID will be used if a match is found in the index. The name will only be used if

local_fallback_ is set, in which case if the build ID is not found, the local filesystem will

be checked for the module name. The name can be empty to disable this behavior.

Missing symbols is not counted as an error, so *module will be empty even on success in this

case. Errors will be from things like corrupted symbols. If a download is requested, downloads

will be kicked off for any missing debug files in this case.

This function uses the build_id for loading symbols. The name is only used for generating

informational messages.

Defined at line 64 of file ../../src/developer/debug/zxdb/symbols/system_symbols.cc

Enumerations

enum DownloadType
Name Value
kNone 0
kSymbols 1
kBinary 2

What kind of downloading should be attempted for missing symbols.

Defined at line 30 of file ../../src/developer/debug/zxdb/symbols/system_symbols.h