nx_dwline_roundtrip_gate.nx
buildroot/runtime/nx_dwline_roundtrip_gate.nx
about
nx_dwline_roundtrip_gate.nx -- DOES OUR DWARF ENCODER PRODUCE A TABLE OUR DECODER READS BACK?
WHY THIS EXISTS. DDR-002 shipped .debug_line (compiler emits .file/.loc -> nxasm builds the line
program -> ELF carries the section) and named its own falsification condition:
"If nx_addr2line cannot round-trip a table nx_dwline_* produced, the two organs disagree
about the format and the arc is blocked on reconciling them."
That condition was NEVER TESTED. The capability had no gate at all, and by this estate's own
doctrine an ungated capability cannot be honestly graded on /compare -- whose subtitle promises
"Nishi cells measured (gates with dates)". This file is that measurement.
WHY IT IS A REAL TWO-SYSTEM CHECK. nx_dwarf_line.nx (encoder) and nx_addr2line_lib.nx (decoder)
share NO code and deliberately repeat the DWARF opcode constants separately. So agreement here is
evidence, not a system agreeing with itself. Do not "clean up" that duplication.
WHY THESE ADDRESSES. 0x400096 -> line 5 and 0x4000AD -> line 9 are the exact pairs an EXTERNAL
oracle (GNU readelf) resolved from a real sovereign ELF built from nx_probe_dbgtiny.nx. Pinning
the gate to externally-confirmed values means a regression cannot be hidden by changing both
sides at once.
CALL SEQUENCE IS COPIED FROM PRODUCTION (nxasm_x86_main.nx: new -> header -> set_address ->
record* -> end_sequence -> finish). A gate that exercised a different sequence would be measuring
something other than what ships -- the instrument-subject mismatch this estate keeps paying for.
license_tier: ORIGINAL expect_exit: 0
dependencies 4 imports · 0 importers
imports: syscalls.nxnx_dwarf_line.nxnx_addr2line_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
| 30 | const DRG_A0: i64 = 0x400096 // readelf-confirmed: line 5 |
| 31 | const DRG_A1: i64 = 0x4000AD // readelf-confirmed: line 9 |
| 32 | const DRG_A2: i64 = 0x4000C0 // third row, so "distinct lines" is testable |
| 33 | const DRG_MID: i64 = 0x4000A0 // strictly between A0 and A1 |
| 34 | const DRG_BEFORE: i64 = 0x400000 // strictly before the first row |
| 35 | const DRG_CAP: i64 = 65536 |
functions
| 39 | func drg_u32(b: *u8, off: i64) -> i64 called by 1: main |
| 49 | func drg_build(outlen: *i64) -> *u8 |
| 69 | func main() -> i64 |