Files
reims-vgpu/scripts/internal/lane-gate/guest/ips-summary.js
T
Anees Iqbal c5a28ff7df 🆕 Summarise the guest's new crash reports in the report
A crash report the guest wrote during the run was named and nothing more,
and it went with the boot's overlay: 40981b303's sweep crashed at
imageio.heic and nobody saw its frames. The final phase now prints each new
report's exception and the faulting thread's top frames (ips-summary.js), and
the report puts them in guest.crash-reports.
2026-11-05 21:59:27 -08:00

16 lines
830 B
JavaScript

// The lane gate's summary of a crash report (guest-run.sh, the final phase): its exception and
// the faulting thread's top frames, one line.
// osascript -l JavaScript ips-summary.js FILE.ips
ObjC.import("Foundation");
function run(argv) {
var t = $.NSString.stringWithContentsOfFileEncodingError(argv[0], $.NSUTF8StringEncoding, null);
if (!t || t.isNil()) return "unreadable";
t = t.js;
var b = JSON.parse(t.slice(t.indexOf("\n") + 1));
var e = b.exception || {}, ft = b.faultingThread || 0, th = (b.threads || [])[ft] || {}, im = b.usedImages || [];
var fr = (th.frames || []).slice(0, 10).map(function (f) {
return (f.symbol || "?") + " (" + ((im[f.imageIndex] || {}).name || "?") + ")";
});
return (e.type || "?") + " " + (e.signal || "") + " " + (e.subtype || "") + "; thread " + ft + ": " + fr.join(" < ");
}