MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / findFunctionEntry

Function findFunctionEntry

src/misc/alloc_tracker_fast_stack.cpp:130–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130static __forceinline PRUNTIME_FUNCTION findFunctionEntry(const CachedModule *mod, DWORD rva, int &hint) {
131 PRUNTIME_FUNCTION table = mod->pdata;
132 int lo = 0, hi = (int)mod->pdataLast;
133 int mid = hint;
134 goto first_check;
135 do {
136 mid = (lo + hi) >> 1;
137 first_check:
138 if (rva < table[mid].BeginAddress) hi = mid - 1;
139 else if (rva >= table[mid].EndAddress) lo = mid + 1;
140 else { hint = mid; return &table[mid]; }
141 } while (lo <= hi);
142 return nullptr;
143}
144
145static __forceinline PRUNTIME_FUNCTION cachedLookupOnly(ULONG64 pc, const CachedModule *&lastModule,
146 ULONG64 &imageBase, int &pdataHint) {

Callers 1

cachedLookupOnlyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected