hyperplatform_log_parser/symbol_resolver.cpp
// Return an offset of the symbols from the base address of the module
Return an offset of the symbols from the base address of the module
Return an offset of the symbols from the base address of the module
_Use_decl_annotations_ std::uint64_t SymbolResolver::GetOffset(
    const std::basic_string<TCHAR> &symbol_name) const {
  std::uint8_t buffer[sizeof(SYMBOL_INFO) + MAX_SYM_NAME * sizeof(TCHAR)] = {};
  auto symbol = reinterpret_cast<PSYMBOL_INFO>(buffer);
  symbol->SizeOfStruct = sizeof(SYMBOL_INFO);
  symbol->MaxNameLen = MAX_SYM_NAME;
  if (!SymFromName_(process_, symbol_name.c_str(), symbol)) {
    return 0;
  }
  return symbol->Address - symbol->ModBase;
}
_Use_decl_annotations_ std :: uint64_t SymbolResolver :: GetOffset ( const std :: basic_string < TCHAR > & symbol_name ) const { std :: uint8_t buffer [ sizeof ( SYMBOL_INFO ) + MAX_SYM_NAME * sizeof ( TCHAR ) ] = { } ; auto symbol = reinterpret_cast < PSYMBOL_INFO > ( buffer ) ; symbol -> SizeOfStruct = sizeof ( SYMBOL_INFO ) ; symbol -> MaxNameLen = MAX_SYM_NAME ; if ( ! SymFromName_ ( process_ , symbol_name . c_str ( ) , symbol ) ) { return 0 ; } return symbol -> Address - symbol -> ModBase ; }
Return an offset of the symbols from the base address of the module
Return an offset of the symbols from the base address of the module