log stack traces

This commit is contained in:
2026-02-18 12:05:05 -06:00
parent 4b635228f9
commit 037fdbfd2c
6 changed files with 171 additions and 114 deletions

View File

@@ -1047,10 +1047,10 @@ void JS_DumpMachBin(JSContext *ctx, const uint8_t *data, size_t size, JSValue en
/* Compile mcode JSON IR to MachCode binary. */
MachCode *mach_compile_mcode(struct cJSON *mcode_json);
/* Get stack trace as cJSON array of frame objects.
Returns NULL if no register VM frame is active.
Caller must call cJSON_Delete() on the result. */
struct cJSON *JS_GetStack (JSContext *ctx);
/* Get stack trace as JS array of {fn, file, line, col} objects.
Returns an empty array if no register VM frame is active.
Does NOT clear reg_current_frame — caller is responsible if needed. */
JSValue JS_GetStack (JSContext *ctx);
#undef js_unlikely
#undef inline