Skip to content

[Based on #126] debug: add schema-driven GDB runtime support - #130

Open
cpunion wants to merge 1 commit into
codex/embedded-debug-remote-2164-20260802from
codex/gdb-runtime-adapter-2164-20260802
Open

[Based on #126] debug: add schema-driven GDB runtime support#130
cpunion wants to merge 1 commit into
codex/embedded-debug-remote-2164-20260802from
codex/gdb-runtime-adapter-2164-20260802

Conversation

@cpunion

@cpunion cpunion commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Part of xgo-dev#2164 Task 4. Based on #126.

LLGo debug artifacts could be transported to GDB, but GDB still exposed raw runtime layouts and section GC could discard the debugger ABI marker on embedded links.

This change:

  • adds an embedded, versioned-schema GDB adapter and launcher with raw-GDB fallback;
  • presents strings, slices, interfaces, funcs, maps, channels, and named values;
  • exposes goroutine listing and thread-backed goroutine commands with M/P ownership checks;
  • retains and aligns the native debugger ABI record through final ELF/Mach-O links;
  • exercises native Linux GDB and Cortex-M QEMU GDB Remote in CI while preserving the existing LLDB remote check.

Local validation:

  • macOS arm64: changed-package tests passed; aggregate coverage 78.1% (cmd/internal/gdb 78.2%, internal/debuginfo 100%, internal/build 77.7%).
  • Linux arm64: native GDB integration passed; adapter/debuginfo aggregate coverage 92.1%; internal/build coverage 77.0%.
  • Linux arm64 + Cortex-M QEMU: stripped load-image equivalence, DWARF verification, GDB Remote runtime presentation, and LLDB Remote source/locals/backtrace all passed.

@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 2, 2026

Copy link
Copy Markdown

LLGo baseline benchmarks

6f2fd2a399b0 | workflow run | long-term charts

Program measurements

Platform Workload File size vs main Build vs main Run vs main
Linux cprintf 19344 B +4.3% (worse) 402.131 ms -2.5% (better) 1.377 ms -11.3% (better)
Linux fmtprintf 2218824 B +0.2% (worse) 3.381 s -12.3% (better) 2.736 ms -16.8% (better)
Linux println 73832 B +1.6% (worse) 382.443 ms -4.4% (better) 1.733 ms +3.6% (worse)
macOS cprintf 84672 B +0.0% 324.509 ms -21.7% (better) 2.757 ms -23.2% (better)
macOS fmtprintf 2361696 B +0.7% (worse) 2.703 s -31.4% (better) 18.705 ms -20.0% (better)
macOS println 125888 B -0.9% (better) 326.006 ms -21.4% (better) 3.692 ms -49.1% (better)
Core language and compiler benchmarks
Platform Benchmark ns/op vs main
Linux BenchmarkLookupPCRandom 12.240 ns/op -9.2% (better)
Linux BenchmarkMergeCompilerFlags 144.200 ns/op -6.7% (better)
Linux BenchmarkMergeLinkerFlags 93.660 ns/op -7.5% (better)
Linux BenchmarkChannelBuffered 36.780 ns/op +5.8% (worse)
Linux BenchmarkChannelHandoff 24655 ns/op -23.0% (better)
Linux BenchmarkDefer 45.380 ns/op -19.4% (better)
Linux BenchmarkDirectCall 1.760 ns/op +12.6% (worse)
Linux BenchmarkGlobalRead 1.757 ns/op +12.6% (worse)
Linux BenchmarkGlobalWrite 2.808 ns/op +12.6% (worse)
Linux BenchmarkGoroutine 29810 ns/op -60.6% (better)
Linux BenchmarkInterfaceCall 8.797 ns/op +12.9% (worse)
Linux BenchmarkRuntimeGetG 2.110 ns/op -60.2% (better)
macOS BenchmarkLookupPCRandom 13.710 ns/op +10.2% (worse)
macOS BenchmarkMergeCompilerFlags 125.300 ns/op +0.6% (worse)
macOS BenchmarkMergeLinkerFlags 77.400 ns/op +11.6% (worse)
macOS BenchmarkChannelBuffered 22.280 ns/op -19.7% (better)
macOS BenchmarkChannelHandoff 9216 ns/op +31.5% (worse)
macOS BenchmarkDefer 28.760 ns/op -23.2% (better)
macOS BenchmarkDirectCall 1.017 ns/op -30.0% (better)
macOS BenchmarkGlobalRead 1.027 ns/op -15.2% (better)
macOS BenchmarkGlobalWrite 1.018 ns/op -31.5% (better)
macOS BenchmarkGoroutine 29357 ns/op -7.3% (better)
macOS BenchmarkInterfaceCall 4.432 ns/op -17.9% (better)
macOS BenchmarkRuntimeGetG 2.313 ns/op -10.2% (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/embedded-debug-remote-2164-20260802 branch from a5d8109 to 39dffea Compare August 2, 2026 07:05
@cpunion
cpunion force-pushed the codex/gdb-runtime-adapter-2164-20260802 branch from 6f2fd2a to 48e105f 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