*: add support for linux/loong64 to native backend (#3892)

* delve: support linux-loong64 native debug

LoongArch is a new RISC ISA, which is independently designed by Loongson Technology.

LoongArch includes a reduced 32-bit version (LA32R), a standard 32-bit version (LA32S)
and a 64-bit version (LA64), and loong64 is the 64-bit version of LoongArch.

LoongArch documentation: https://github.com/loongson/LoongArch-Documentation.git

* *: mark loong64 port as experimental

---------

Co-authored-by: Huang Qiqi <huangqiqi@loongson.cn>
This commit is contained in:
yelvens
2025-01-18 01:41:37 +08:00
committed by GitHub
parent 38af36e942
commit d2f748f1bd
36 changed files with 3803 additions and 25 deletions

View File

@ -63,6 +63,9 @@ func TestDebugger_LaunchInvalidFormat(t *testing.T) {
if runtime.GOARCH == "riscv64" && runtime.GOOS == "linux" {
t.Setenv("GOARCH", "amd64")
}
if runtime.GOARCH == "loong64" && runtime.GOOS == "linux" {
t.Setenv("GOARCH", "amd64")
}
t.Setenv("GOOS", switchOS[runtime.GOOS])
exepath := filepath.Join(buildtestdir, debugname)
if err := gobuild.GoBuild(debugname, []string{buildtestdir}, fmt.Sprintf("-o %s", exepath)); err != nil {
@ -115,7 +118,7 @@ func TestDebugger_LaunchCurrentDir(t *testing.T) {
func guessSubstitutePathHelper(t *testing.T, args *api.GuessSubstitutePathIn, fnpaths [][2]string, tgt map[string]string) {
const base = 0x40000
t.Helper()
bins := [][]proc.Function{[]proc.Function{}}
bins := [][]proc.Function{{}}
for i, fnpath := range fnpaths {
bins[0] = append(bins[0], proc.Function{Name: fnpath[0], Entry: uint64(base + i)})
}