Skip to content

[Based on #130] debug: add cross-platform session entry point - #131

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

[Based on #130] debug: add cross-platform session entry point#131
cpunion wants to merge 1 commit into
codex/gdb-runtime-adapter-2164-20260802from
codex/debug-command-2164-20260802

Conversation

@cpunion

@cpunion cpunion commented Aug 2, 2026

Copy link
Copy Markdown
Owner

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

llgo lldb opens an existing artifact, while embedded debugging still required callers to build, start a server, connect, and clean up each process manually.

This change:

  • adds llgo debug to build one executable package with DWARF and an -O0 debug default;
  • routes native sessions to LLDB and non-Wasm embedded sessions to GDB, with explicit backend overrides;
  • starts and cleans up target-configured debug servers or OpenOCD, and supports externally managed -remote sessions;
  • keeps llgo lldb as the explicit existing-artifact command;
  • moves the native LLDB and Cortex-M GDB/LLDB Remote integration checks through the new entry point.

The command reserves wasmtime and browser backend identities; their transports remain Tasks 5 and 6.

Local validation:

  • macOS arm64: command packages, LLDB integration, race, and vet passed;
  • Linux arm64: command packages, native GDB, native LLDB, and Cortex-M QEMU GDB/LLDB Remote passed;
  • cmd/internal/debug coverage is 78.2% on both platforms.

@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

5fd8839902f4 | 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) 369.063 ms -10.5% (better) 1.369 ms -11.8% (better)
Linux fmtprintf 2218832 B +0.2% (worse) 3.517 s -8.8% (better) 2.500 ms -23.9% (better)
Linux println 73832 B +1.6% (worse) 372.590 ms -6.9% (better) 1.616 ms -3.4% (better)
macOS cprintf 84672 B +0.0% 340.278 ms -17.9% (better) 2.331 ms -35.0% (better)
macOS fmtprintf 2361696 B +0.7% (worse) 2.570 s -34.8% (better) 16.415 ms -29.8% (better)
macOS println 125888 B -0.9% (better) 313.988 ms -24.3% (better) 3.390 ms -53.3% (better)
Core language and compiler benchmarks
Platform Benchmark ns/op vs main
Linux BenchmarkLookupPCRandom 13.250 ns/op -1.7% (better)
Linux BenchmarkMergeCompilerFlags 159.900 ns/op +3.5% (worse)
Linux BenchmarkMergeLinkerFlags 105.100 ns/op +3.8% (worse)
Linux BenchmarkChannelBuffered 34.890 ns/op +0.4% (worse)
Linux BenchmarkChannelHandoff 28648 ns/op -10.6% (better)
Linux BenchmarkDefer 46.250 ns/op -17.9% (better)
Linux BenchmarkDirectCall 1.558 ns/op -0.3% (better)
Linux BenchmarkGlobalRead 1.556 ns/op -0.3% (better)
Linux BenchmarkGlobalWrite 2.482 ns/op -0.5% (better)
Linux BenchmarkGoroutine 33873 ns/op -55.2% (better)
Linux BenchmarkInterfaceCall 8.089 ns/op +3.8% (worse)
Linux BenchmarkRuntimeGetG 2.177 ns/op -59.0% (better)
macOS BenchmarkLookupPCRandom 10.680 ns/op -14.1% (better)
macOS BenchmarkMergeCompilerFlags 100.400 ns/op -19.4% (better)
macOS BenchmarkMergeLinkerFlags 59.330 ns/op -14.4% (better)
macOS BenchmarkChannelBuffered 21.140 ns/op -23.8% (better)
macOS BenchmarkChannelHandoff 6450 ns/op -8.0% (better)
macOS BenchmarkDefer 29.980 ns/op -19.9% (better)
macOS BenchmarkDirectCall 0.948 ns/op -34.8% (better)
macOS BenchmarkGlobalRead 0.943 ns/op -22.1% (better)
macOS BenchmarkGlobalWrite 0.941 ns/op -36.7% (better)
macOS BenchmarkGoroutine 20408 ns/op -35.5% (better)
macOS BenchmarkInterfaceCall 4.460 ns/op -17.4% (better)
macOS BenchmarkRuntimeGetG 1.882 ns/op -27.0% (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/gdb-runtime-adapter-2164-20260802 branch from 6f2fd2a to 48e105f Compare August 2, 2026 07:05
@cpunion
cpunion force-pushed the codex/debug-command-2164-20260802 branch from 488efe3 to 5fd8839 Compare August 2, 2026 07:06
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