Problem
tramp_sys_log in simulator/unicorn_trampolines.c (~line 1132) — the trampoline that services log() calls from a native ELF app — prints directly to the simulator process's own stdout and never calls sim_log_append().
By contrast, the Lua path does call it: l_sys_log in src/os/lua_bridge_sys.c calls sim_log_append(msg) when built with PICOS_SIMULATOR defined.
Impact
get_log_buffer() / wait_for_log() (the simulator RPCs e2e tests use to observe app output) can never see anything a native app logs, no matter how long a test waits. Every e2e test targeting a native ELF app has to scrape the subprocess's raw stdout/stderr pipes instead of using the log-buffer RPCs that Lua-app tests get to use — an inconsistent and more fragile testing surface depending on app type.
Suggested direction
Call sim_log_append() from tramp_sys_log, mirroring what l_sys_log already does for Lua apps, so both app types report through the same channel.
Context
Surfaced while implementing Stage 0/1 of the C-Dogs asset-memory redesign (local specs, not tracked in this repo) — C-Dogs is a native ELF app. Parent commits e9b1622e..21a9b389.
Problem
tramp_sys_loginsimulator/unicorn_trampolines.c(~line 1132) — the trampoline that serviceslog()calls from a native ELF app — prints directly to the simulator process's own stdout and never callssim_log_append().By contrast, the Lua path does call it:
l_sys_loginsrc/os/lua_bridge_sys.ccallssim_log_append(msg)when built withPICOS_SIMULATORdefined.Impact
get_log_buffer()/wait_for_log()(the simulator RPCs e2e tests use to observe app output) can never see anything a native app logs, no matter how long a test waits. Every e2e test targeting a native ELF app has to scrape the subprocess's raw stdout/stderr pipes instead of using the log-buffer RPCs that Lua-app tests get to use — an inconsistent and more fragile testing surface depending on app type.Suggested direction
Call
sim_log_append()fromtramp_sys_log, mirroring whatl_sys_logalready does for Lua apps, so both app types report through the same channel.Context
Surfaced while implementing Stage 0/1 of the C-Dogs asset-memory redesign (local specs, not tracked in this repo) — C-Dogs is a native ELF app. Parent commits
e9b1622e..21a9b389.