feat(debug): multi-architecture debugger support for arm64, riscv64, loong64

Assisted-by: MiMo V2.5 Pro
This commit is contained in:
2026-08-21 00:35:21 +02:00
parent 3acbdd6533
commit de9e211ff1
32 changed files with 2276 additions and 659 deletions
+6 -3
View File
@@ -1,6 +1,8 @@
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
// SPDX-License-Identifier: BSD-3-Clause
//go:build linux && amd64
package debug
import (
@@ -273,6 +275,7 @@ func TestBreakpointInfo(t *testing.T) {
}
func TestWatchpointSlotTracking(t *testing.T) {
wpSlots = [4]bool{} // reset
s := &Session{}
// All four slots are free initially.
@@ -286,8 +289,8 @@ func TestWatchpointSlotTracking(t *testing.T) {
}
// Manually mark slots 0 and 2 as used (simulating successful SetWatchpoint).
s.wpSlots[0] = true
s.wpSlots[2] = true
wpSlots[0] = true
wpSlots[2] = true
if !s.IsWatchpointSlotUsed(0) {
t.Error("slot 0 should be in use")
@@ -315,7 +318,7 @@ func TestWatchpointSlotTracking(t *testing.T) {
// Mark all slots used: FindFreeWatchpointSlot returns -1.
for i := 0; i < 4; i++ {
s.wpSlots[i] = true
wpSlots[i] = true
}
if got := s.FindFreeWatchpointSlot(); got != -1 {
t.Errorf("FindFreeWatchpointSlot() with all slots used = %d, want -1", got)