pub trait SymbolicationResult {
    fn from_full_map<S>(map: Vec<(u32, S)>) -> Self
    where
        S: Deref<Target = str>
; fn for_addresses(addresses: &[u32]) -> Self; fn add_address_symbol(
        &mut self,
        address: u32,
        symbol_address: u32,
        symbol_name: &str,
        function_size: Option<u32>
    ); fn add_address_debug_info(&mut self, address: u32, info: AddressDebugInfo); fn set_total_symbol_count(&mut self, total_symbol_count: u32); }
Expand description

A trait which allows many “get_symbolication_result” functions to share code between the implementation that constructs a full symbol table and the implementation that constructs a JSON response with data per looked-up address.

Required Methods

Create a SymbolicationResult object based on a full symbol map. Only called if result_kind is SymbolicationResultKind::AllSymbols.

Create a SymbolicationResult object based on a set of addresses. Only called if result_kind is SymbolicationResultKind::SymbolsForAddresses. The data for each address will be supplied by subsequent calls to add_address_symbol and potentially add_address_debug_info.

Called to supply the symbol name for a symbol. Only called if result_kind is SymbolicationResultKind::SymbolsForAddresses, and only on objects constructed by a call to for_addresses. address is the address that the consumer wants to look up, and may fall anywhere inside a function. symbol_address is the closest (<= address) symbol address.

Called to supply debug info for the address. Only called if result_kind is SymbolicationResultKind::SymbolsForAddresses { with_debug_info: true }.

Supplies the total number of symbols in this binary. Only called if result_kind is SymbolicationResultKind::SymbolsForAddresses, and only on objects constructed by a call to for_addresses.

Implementors