code wiki / (root) / nx_dwline_roundtrip_gate.nx

nx_dwline_roundtrip_gate.nx

buildroot/runtime/nx_dwline_roundtrip_gate.nx

8990 B156 linesdepth 4pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic dwline
docsdependenciesstructsconstsfunctions

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

syscalls.nx nx_dwarf_line.nx nx_addr2line_lib.nx nx_gate_verdict.nx nx_dwline_roundtrip_gate.nx

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

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ drg_build nx_dwline_new nx_dwline_header nx_dwline_u32 nx_dwline_byte nx_dwline_u16 nx_dwline_byte ↻ nx_dwline_byte ↻ nx_dwline_uleb nx_dwline_byte ↻ nx_dwline_strn nx_dwline_byte ↻ nx_dwline_patch_u32 nx_dwline_set_address nx_dwline_byte ↻ nx_dwline_record nx_dwline_set_file nx_dwline_byte ↻ nx_dwline_uleb ↻ nx_dwline_set_address ↻

structs

none

consts

30const DRG_A0: i64 = 0x400096 // readelf-confirmed: line 5
31const DRG_A1: i64 = 0x4000AD // readelf-confirmed: line 9
32const DRG_A2: i64 = 0x4000C0 // third row, so "distinct lines" is testable
33const DRG_MID: i64 = 0x4000A0 // strictly between A0 and A1
34const DRG_BEFORE: i64 = 0x400000 // strictly before the first row
35const DRG_CAP: i64 = 65536

functions

39func drg_u32(b: *u8, off: i64) -> i64
called by 1: main
49func drg_build(outlen: *i64) -> *u8
69func main() -> i64