Skip to content

Commit 3b65d9c

Browse files
authored
Merge pull request #134 from krishna3554/fix-arm64-args-six-registers
regs: arm64: return all six syscall argument registers in Args()
2 parents e11f92d + 637a53b commit 3b65d9c

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

pkg/dynamic/tracer/regs/regs_linux_arm64.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ func (regs *Regs) Syscall() uint64 {
55
}
66

77
func (regs *Regs) Args() []uint64 {
8-
return regs.Regs[0:5]
8+
return regs.Regs[0:6]
99
}
1010

1111
func (regs *Regs) SetSyscall(v uint64) {
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//go:build linux && (amd64 || arm64)
2+
3+
package regs
4+
5+
import (
6+
"testing"
7+
8+
"gotest.tools/v3/assert"
9+
)
10+
11+
func TestArgsArity(t *testing.T) {
12+
assert.Equal(t, len((&Regs{}).Args()), 6)
13+
}

0 commit comments

Comments
 (0)