nx_dwline_e2e_gate.nx
buildroot/runtime/nx_dwline_e2e_gate.nx
about
nx_dwline_e2e_gate.nx -- COMPILER -> ASSEMBLER -> ELF -> DECODER, on the real toolchain.
nx_dwline_roundtrip_gate proves our DWARF encoder and decoder agree ON A BUFFER. That is a real
two-system check but it does NOT prove the shipped pipeline produces such a buffer. This gate
drives the actual sovereign toolchain -- nx_cc_sovereign.elf -g, then nxasm_x86_main.elf -- reads
the ELF that falls out, and resolves an address through nx_addr2line_lib.
GROUND TRUTH IS THE SOURCE FILE, NOT OUR OWN OUTPUT. runtime/nx_probe_dbgtiny.nx defines
dbgtiny_a on line 5 and main on line 9. GNU readelf independently resolved 0x400096 -> line 5 and
0x4000AD -> line 9 on this exact probe, so asserting "e_entry resolves to line 9" is checked
against an external oracle and against the source, not against a number we made up.
THE LOAD-BEARING TOOTH IS THE NEGATIVE CONTROL. Compiling the SAME probe WITHOUT -g must produce
an ELF with NO .debug_line at all. Without it, a pipeline that emitted debug info unconditionally
would pass every positive tooth here -- and it would silently regress the published "168 B minimal
static binary" measurement, which is a MEASURED exceed on /compare/lang. DDR-002 named that
tradeoff as its load-bearing risk; this is the check that holds it.
license_tier: ORIGINAL expect_exit: 0
dependencies 5 imports · 0 importers
imports: syscalls.nxnx_elf_read.nxnx_addr2line_lib.nxnx_deploy_lib.nxnx_gate_verdict.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 26 | const E2E_CAP: i64 = 4194304 |
| 27 | const E2E_CC: *u8 = "_offc/nx_cc_sovereign.elf" as *u8 |
| 28 | const E2E_ASM: *u8 = "_offc/nxasm_x86_main.elf" as *u8 |
| 29 | const E2E_SRC: *u8 = "runtime/nx_probe_dbgtiny.nx" as *u8 |
| 30 | const E2E_SG: *u8 = "/tmp/nx_dwe2e_g.s" as *u8 |
| 31 | const E2E_EG: *u8 = "/tmp/nx_dwe2e_g.elf" as *u8 |
| 32 | const E2E_SN: *u8 = "/tmp/nx_dwe2e_nog.s" as *u8 |
| 33 | const E2E_EN: *u8 = "/tmp/nx_dwe2e_nog.elf" as *u8 |
functions
| 35 | func e2e_streq(a: *u8, b: *u8) -> i64 called by 1: e2e_debug_line |
| 53 | func e2e_run_out(elf: *u8, args: *i64, nargs: i64, outfile: *u8) -> i64 called by 1: main |
| 75 | func e2e_contains(hay: *u8, n: i64, needle: *u8) -> i64 called by 1: main |
| 90 | func e2e_hex(dst: *u8, v: i64) -> i64 called by 1: main |
| 110 | func e2e_read(path: *u8, buf: *u8, cap: i64) -> i64 called by 1: main |
| 124 | func e2e_debug_line(buf: *u8, len: i64, box: *i64) -> i64 |
| 142 | func main() -> i64 |