Add support for windows/arm64 (#3063)

* Add support for windows/arm64

* split sentinel files and add winarm64 experiment

* update loadBinaryInfoPE to support PIE binaries

* skip TestDump on windows/arm64

* run windows/arm64 compilation on windows/amd64

* add entry point check for pie binaries

* delete unusded code

* document windows/arm64 breakpoint

* implement changing windows/arm64 fp registers

* update crosscall offset names

* fix G load when using CGO

* fix testvariablescgo

* remove DerefGStructOffset

* derefrence gstructoffset in GStructOffset() if necessary
This commit is contained in:
Quim Muntal
2022-09-21 22:39:44 +02:00
committed by GitHub
parent 8337b5a8a9
commit 4455d6a9ef
23 changed files with 406 additions and 68 deletions

View File

@ -438,8 +438,12 @@ func getGVariable(thread Thread) (*Variable, error) {
gaddr, hasgaddr := regs.GAddr()
if !hasgaddr {
var err error
gaddr, err = readUintRaw(thread.ProcessMemory(), regs.TLS()+thread.BinInfo().GStructOffset(), int64(thread.BinInfo().Arch.PtrSize()))
bi := thread.BinInfo()
offset, err := bi.GStructOffset(thread.ProcessMemory())
if err != nil {
return nil, err
}
gaddr, err = readUintRaw(thread.ProcessMemory(), regs.TLS()+offset, int64(bi.Arch.PtrSize()))
if err != nil {
return nil, err
}