mirror of
				https://github.com/go-delve/delve.git
				synced 2025-10-31 02:36:18 +08:00 
			
		
		
		
	proc: fix arm64 prologue
This commit is contained in:
		| @ -5,8 +5,6 @@ | ||||
| package proc | ||||
|  | ||||
| import ( | ||||
| 	//"encoding/binary" | ||||
|  | ||||
| 	"golang.org/x/arch/arm64/arm64asm" | ||||
| ) | ||||
|  | ||||
| @ -99,16 +97,13 @@ type instrseq []arm64asm.Op | ||||
|  | ||||
| // Possible stacksplit prologues are inserted by stacksplit in | ||||
| // $GOROOT/src/cmd/internal/obj/arm64/obj7.go. | ||||
| // The stacksplit prologue will always begin with loading curg in CX, this | ||||
| // instruction is added by load_g_cx in the same file and is either 1 or 2 | ||||
| // MOVs. | ||||
| var prologues []instrseq | ||||
|  | ||||
| func init() { | ||||
| 	var tinyStacksplit = instrseq{arm64asm.MOV, arm64asm.CMP, arm64asm.B} | ||||
| 	var smallStacksplit = instrseq{arm64asm.SUB, arm64asm.CMP, arm64asm.B} | ||||
| 	var bigStacksplit = instrseq{arm64asm.CMP, arm64asm.B, arm64asm.ADD, arm64asm.SUB, arm64asm.MOV, arm64asm.CMP, arm64asm.B} | ||||
| 	var unixGetG = instrseq{arm64asm.MOV} | ||||
| 	var unixGetG = instrseq{arm64asm.LDR} | ||||
|  | ||||
| 	prologues = make([]instrseq, 0, 3) | ||||
| 	for _, getG := range []instrseq{unixGetG} { | ||||
|  | ||||
| @ -2136,9 +2136,6 @@ func TestIssue573(t *testing.T) { | ||||
| } | ||||
|  | ||||
| func TestTestvariables2Prologue(t *testing.T) { | ||||
| 	if runtime.GOARCH == "arm64" { | ||||
| 		t.Skip("test is not valid on ARM64") | ||||
| 	} | ||||
| 	withTestProcess("testvariables2", t, func(p proc.Process, fixture protest.Fixture) { | ||||
| 		addrEntry := p.BinInfo().LookupFunc["main.main"].Entry | ||||
| 		addrPrologue := findFunctionLocation(p, t, "main.main") | ||||
|  | ||||
| @ -1110,9 +1110,6 @@ func clientEvalVariable(t *testing.T, c service.Client, expr string) *api.Variab | ||||
| } | ||||
|  | ||||
| func TestSkipPrologue(t *testing.T) { | ||||
| 	if runtime.GOARCH == "arm64" { | ||||
| 		t.Skip("test is not valid on ARM64") | ||||
| 	} | ||||
| 	withTestClient2("locationsprog2", t, func(c service.Client) { | ||||
| 		<-c.Continue() | ||||
|  | ||||
| @ -1129,9 +1126,6 @@ func TestSkipPrologue(t *testing.T) { | ||||
| } | ||||
|  | ||||
| func TestSkipPrologue2(t *testing.T) { | ||||
| 	if runtime.GOARCH == "arm64" { | ||||
| 		t.Skip("test is not valid on ARM64") | ||||
| 	} | ||||
| 	withTestClient2("callme", t, func(c service.Client) { | ||||
| 		callme := findLocationHelper(t, c, "main.callme", false, 1, 0)[0] | ||||
| 		callmeZ := uint64(clientEvalVariable(t, c, "main.callme").Addr) | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 hengwu0
					hengwu0