github.com/Rookout/GoSDK@v0.1.48/pkg/services/instrumentation/hooker/native_api_unsupported_versions.go (about)

     1  //go:build windows || (!amd64 && !arm64) || !cgo
     2  // +build windows !amd64,!arm64 !cgo
     3  
     4  package hooker
     5  
     6  import (
     7  	"github.com/Rookout/GoSDK/pkg/augs"
     8  	"github.com/Rookout/GoSDK/pkg/rookoutErrors"
     9  	"github.com/Rookout/GoSDK/pkg/services/instrumentation/module"
    10  	"github.com/Rookout/GoSDK/pkg/services/safe_hook_validator"
    11  )
    12  
    13  type NativeAPI struct{}
    14  
    15  func NewNativeAPI() *NativeAPI {
    16  	return &NativeAPI{}
    17  }
    18  
    19  func Init(_ func()) rookoutErrors.RookoutError {
    20  	return rookoutErrors.NewUnsupportedPlatform()
    21  }
    22  
    23  func Destroy() error {
    24  	return rookoutErrors.NewUnsupportedPlatform()
    25  }
    26  
    27  func (n *NativeAPI) RegisterFunctionBreakpointsState(functionEntry Address, functionEnd Address, breakpoints []*augs.BreakpointInstance, bpCallback uintptr, prologue []byte, hasStackFrame bool) (stateId int, err error) {
    28  	return 0, rookoutErrors.NewUnsupportedPlatform()
    29  }
    30  
    31  func (n *NativeAPI) GetInstructionMapping(_ uint64, _ uint64, _ int) ([]module.AddressMapping, []module.AddressMapping, error) {
    32  	return nil, nil, rookoutErrors.NewUnsupportedPlatform()
    33  }
    34  func (n *NativeAPI) GetStateEntryAddr(functionEntry uint64, functionEnd uint64, stateId int) (uintptr, error) {
    35  	return 0, rookoutErrors.NewUnsupportedPlatform()
    36  }
    37  
    38  func (n *NativeAPI) ApplyBreakpointsState(functionEntry Address, functionEnd Address, stateId int) (err error) {
    39  	return rookoutErrors.NewUnsupportedPlatform()
    40  }
    41  
    42  func (n *NativeAPI) GetHookAddress(functionEntry uint64, functionEnd uint64, stateId int) (uintptr, rookoutErrors.RookoutError) {
    43  	return 0, rookoutErrors.NewUnsupportedPlatform()
    44  }
    45  
    46  func (n *NativeAPI) GetFunctionType(functionEntry uint64, functionEnd uint64) (safe_hook_validator.FunctionType, error) {
    47  	return 0, rookoutErrors.NewUnsupportedPlatform()
    48  }
    49  
    50  func (n *NativeAPI) GetDangerZoneStartAddress(functionEntry uint64, functionEnd uint64) (uint64, error) {
    51  	return 0, rookoutErrors.NewUnsupportedPlatform()
    52  }
    53  
    54  func (n *NativeAPI) GetDangerZoneEndAddress(functionEntry uint64, functionEnd uint64) (uint64, error) {
    55  	return 0, rookoutErrors.NewUnsupportedPlatform()
    56  }
    57  
    58  func (n *NativeAPI) TriggerWatchDog(timeoutMS uint64) error {
    59  	return rookoutErrors.NewUnsupportedPlatform()
    60  }
    61  
    62  func (n *NativeAPI) DefuseWatchDog() {
    63  }