Skip to content

[Based on #114] debug: define the common debugger ABI - #120

Open
cpunion wants to merge 4 commits into
codex/debug-artifact-report-2164-20260801from
codex/debugger-abi-schema-2164-20260802
Open

[Based on #114] debug: define the common debugger ABI#120
cpunion wants to merge 4 commits into
codex/debug-artifact-report-2164-20260801from
codex/debugger-abi-schema-2164-20260802

Conversation

@cpunion

@cpunion cpunion commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Implements Task 2 of xgo-dev#2164 on top of #114.

Defines a versioned, debugger-independent llgo.debugger schema and a fixed 16-byte ABI record carrying the schema/runtime/LLGo ABI versions, C ABI mode, pointer size, and byte order. Native DWARF builds retain the structured record plus the v1 compatibility marker; embedded and external Wasm artifacts carry the same record in a custom section, including both the deployment module and DWARF sidecar.

The stock-LLDB launcher now installs and consumes the canonical schema, prefers the structured record, preserves marker-v1 fallback, and rejects unknown or target-incompatible records without disabling raw LLDB commands. Shared debugger fixtures cover primitives, aliases and named types, recursive and aggregate values, strings, slices, maps, channels, interfaces, functions, closures, bound methods, and goroutines.

Validation:

  • macOS/arm64: affected Go tests and coverage; schema 93.8%, debuginfo 100%, wasmdebug 95.5%, LLDB launcher 87.5%; all new record publication/decoding functions 100% except immutable-schema parse error branches.
  • macOS/arm64: 224/224 real LLDB source/value tests; non-LLGo, legacy-unknown, ambiguous, structured-unknown, and target-mismatch fallback checks.
  • macOS/arm64 and Linux/amd64 (OrbStack): shared fixture builds and runs with LLGo; Mach-O/ELF records retained.
  • macOS/arm64 and Linux/amd64: embedded Wasm, external deployment Wasm, and external DWARF sidecar contain the same validated llgo.debugger record; the deployment module has no embedded DWARF.
  • Linux/amd64: affected Go tests and coverage passed. The full process-control LLDB suite remains assigned to native CI because OrbStack LLDB/gdbserver does not preserve the selected frame reliably.

@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

LLGo baseline benchmarks

d6ab27ae09ae | workflow run | long-term charts

Program measurements

Platform Workload File size vs main Build vs main Run vs main
Linux cprintf 18544 B +0.0% 342.121 ms -17.0% (better) 1.262 ms -18.7% (better)
Linux fmtprintf 2217608 B +0.2% (worse) 3.450 s -10.5% (better) 2.448 ms -25.5% (better)
Linux println 71504 B -1.6% (better) 344.147 ms -14.0% (better) 1.603 ms -4.2% (better)
macOS cprintf 84672 B +0.0% 513.298 ms +23.9% (worse) 2.902 ms -19.1% (better)
macOS fmtprintf 2361520 B +0.7% (worse) 2.431 s -38.3% (better) 16.325 ms -30.2% (better)
macOS println 125712 B -1.0% (better) 413.047 ms -0.4% (better) 5.172 ms -28.8% (better)
Core language and compiler benchmarks
Platform Benchmark ns/op vs main
Linux BenchmarkLookupPCRandom 13.280 ns/op -1.5% (better)
Linux BenchmarkMergeCompilerFlags 150.600 ns/op -2.5% (better)
Linux BenchmarkMergeLinkerFlags 97.520 ns/op -3.7% (better)
Linux BenchmarkChannelBuffered 34 ns/op -2.2% (better)
Linux BenchmarkChannelHandoff 27759 ns/op -13.3% (better)
Linux BenchmarkDefer 45.880 ns/op -18.5% (better)
Linux BenchmarkDirectCall 1.557 ns/op -0.4% (better)
Linux BenchmarkGlobalRead 1.871 ns/op +19.9% (worse)
Linux BenchmarkGlobalWrite 2.488 ns/op -0.2% (better)
Linux BenchmarkGoroutine 32587 ns/op -56.9% (better)
Linux BenchmarkInterfaceCall 8.116 ns/op +4.1% (worse)
Linux BenchmarkRuntimeGetG 1.868 ns/op -64.8% (better)
macOS BenchmarkLookupPCRandom 11.010 ns/op -11.5% (better)
macOS BenchmarkMergeCompilerFlags 99.900 ns/op -19.8% (better)
macOS BenchmarkMergeLinkerFlags 65.770 ns/op -5.2% (better)
macOS BenchmarkChannelBuffered 23.410 ns/op -15.6% (better)
macOS BenchmarkChannelHandoff 5312 ns/op -24.2% (better)
macOS BenchmarkDefer 27.480 ns/op -26.6% (better)
macOS BenchmarkDirectCall 0.942 ns/op -35.2% (better)
macOS BenchmarkGlobalRead 0.946 ns/op -21.9% (better)
macOS BenchmarkGlobalWrite 0.941 ns/op -36.7% (better)
macOS BenchmarkGoroutine 23190 ns/op -26.7% (better)
macOS BenchmarkInterfaceCall 4.519 ns/op -16.3% (better)
macOS BenchmarkRuntimeGetG 2.115 ns/op -17.9% (better)

Compared only with the latest matching platform in the main series.

Warning

  • Persistent publishing is unavailable because no data token is configured.

@cpunion
cpunion force-pushed the codex/debug-artifact-report-2164-20260801 branch from 90d0205 to b460595 Compare August 2, 2026 07:05
@cpunion
cpunion force-pushed the codex/debugger-abi-schema-2164-20260802 branch from d6ab27a to 2ba269c Compare August 2, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant