class SymbolFactory

Defined at line 33 of file ../../src/developer/debug/zxdb/symbols/symbol_factory.h

This class converts the information from a LazySymbol to a real Symbol.

Having this class be reference counted also solves the problem of lifetimes. The module may get

unloaded, and with it the symbol information. It's too error-prone to require Symbols not be

cached since they will be very common.

This class allows each LazySymbol to have one reference-counted pointer (relatively lightweight)

to the factory. The factory can then have one (expensive) weak pointer to the underlying module

symbols. When the module is unloaded, the factory may still be around but it will return empty

types.

Last, this class allows types to be mocked without requiring that the full and complex Symbol

interface be virtual and duplicated.

Public Methods

fxl::RefPtr<Symbol> CreateSymbol (uint64_t die_offset)

This function should never return null. To indicate failure, return a new default-constructed

Symbol object.

LazySymbol MakeLazy (uint64_t die_offset)

Returns a LazySymbol referencing the given DIE or DIE offset.

Defined at line 12 of file ../../src/developer/debug/zxdb/symbols/symbol_factory.cc

UncachedLazySymbol MakeUncachedLazy (uint64_t die_offset)

Defined at line 16 of file ../../src/developer/debug/zxdb/symbols/symbol_factory.cc

Protected Methods

void SymbolFactory ()

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

void ~SymbolFactory ()

Defined at line 47 of file ../../src/developer/debug/zxdb/symbols/symbol_factory.h

Friends

class RefCountedThreadSafe