When --runtime-source is a directory of xgameruntime*.cpp (the default
runtime/shims), main() checked if os.path.isfile(a.runtime_source):
inputs.append(a.runtime_source). This left all scanned shim C++ files
omitted from collision detection, allowing --out to overwrite them.
Extract
untime_source_paths to enumerate the scanned shim files and
include them in the collision check against json/txt output paths.
The served check read xgameruntime.cpp alone, so on the executable's first look the
classes QueryApiImpl hands on to xgameruntime_user.cpp, _gamesave.cpp and _store.cpp
would have been listed as missing. --runtime-source now takes a file or a folder;
the default is runtime/shims.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A title linked with xgameruntime.lib imports no GDK function: each thunk asks
QueryApiImpl (through a helper) for a class and interface, calls one vtable
slot and releases the object. tools/gdk_runtime_calls.py finds those thunks in
a PE without running it: the helper a known id's lea feeds, every call to it,
the class id in rcx and the interface id in rdx (unknown ids reported as such,
calls whose ids it can't read listed) and each slot called up to Release (CFG
dispatch, call [r+disp8/disp32], any vtable register, register copies
followed), scoped by .pdata or a byte window. Slots are named from
tools/gdk_runtime_classes.json (ids, inheritance and method order of
xgameruntime-docs, GPL-3.0, facts only; made by
tools/gen_gdk_runtime_classes.py). The report flags classes
runtime/shims/xgameruntime.cpp serves, estimates argument counts, says whether
anything in the image reaches each thunk, and lists known ids no thunk uses.
Text by default, --json, --out DIR.
Measured on the package: XCurl.dll and the four classes read by hand in
libHttpClient.GDK.dll match the slots in docs/runtime_imports.md.
libHttpClient holds the ids of 23 of the 24 documented classes (not
XGameActivationImpl's) and thunks for all 23, but is incrementally linked and
references only 15 of its 404 thunks (XThreadingImpl, XErrorImpl); the
module table now says so instead of "24 of 24, five called through thunks".
scripts/first_look.ps1 runs the tool on the executable, and the day-one
checklist in docs/design.md points at its report.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>