File: nonative_darwin.go

package info (click to toggle)
delve 1.24.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 14,092 kB
  • sloc: ansic: 111,943; sh: 169; asm: 141; makefile: 43; python: 23
file content (143 lines) | stat: -rw-r--r-- 3,997 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
//go:build darwin && !macnative

package native

import (
	"errors"

	"github.com/go-delve/delve/pkg/dwarf/op"
	"github.com/go-delve/delve/pkg/proc"
	"github.com/go-delve/delve/pkg/proc/amd64util"
	"github.com/go-delve/delve/pkg/proc/internal/ebpf"
)

var ErrNativeBackendDisabled = errors.New("native backend disabled during compilation")

// Launch returns ErrNativeBackendDisabled.
func Launch(_ []string, _ string, _ proc.LaunchFlags, _ []string, _ string, _ string, _ proc.OutputRedirect, _ proc.OutputRedirect) (*proc.TargetGroup, error) {
	return nil, ErrNativeBackendDisabled
}

// Attach returns ErrNativeBackendDisabled.
func Attach(_ int, _ *proc.WaitFor, _ []string) (*proc.TargetGroup, error) {
	return nil, ErrNativeBackendDisabled
}

func waitForSearchProcess(string, map[int]struct{}) (int, error) {
	return 0, proc.ErrWaitForNotImplemented
}

// waitStatus is a synonym for the platform-specific WaitStatus
type waitStatus struct{}

// osSpecificDetails holds information specific to the OSX/Darwin
// operating system / kernel.
type osSpecificDetails struct{}

// osProcessDetails holds Darwin specific information.
type osProcessDetails struct{}

func (os *osProcessDetails) Close() {}

func killProcess(pid int) error {
	panic(ErrNativeBackendDisabled)
}

func registers(thread *nativeThread) (proc.Registers, error) {
	panic(ErrNativeBackendDisabled)
}

func (dbp *nativeProcess) requestManualStop() (err error) {
	panic(ErrNativeBackendDisabled)
}

func (*processGroup) resume() error {
	panic(ErrNativeBackendDisabled)
}

func trapWait(procgrp *processGroup, pid int) (*nativeThread, error) {
	panic(ErrNativeBackendDisabled)
}

func (*processGroup) stop(cctx *proc.ContinueOnceContext, trapthread *nativeThread) (*nativeThread, error) {
	panic(ErrNativeBackendDisabled)
}

func (dbp *nativeProcess) updateThreadList() error {
	panic(ErrNativeBackendDisabled)
}

func (*processGroup) kill(dbp *nativeProcess) (err error) {
	panic(ErrNativeBackendDisabled)
}

func (dbp *nativeProcess) detach(kill bool) error {
	panic(ErrNativeBackendDisabled)
}

// EntryPoint returns the entry point for the process,
// useful for PIEs.
func (dbp *nativeProcess) EntryPoint() (uint64, error) {
	panic(ErrNativeBackendDisabled)
}

func (dbp *nativeProcess) SupportsBPF() bool {
	panic(ErrNativeBackendDisabled)
}

func (dbp *nativeProcess) SetUProbe(fnName string, goidOffset int64, args []ebpf.UProbeArgMap) error {
	panic(ErrNativeBackendDisabled)
}

func (dbp *nativeProcess) GetBufferedTracepoints() []ebpf.RawUProbeParams {
	panic(ErrNativeBackendDisabled)
}

// SetPC sets the value of the PC register.
func (t *nativeThread) setPC(pc uint64) error {
	panic(ErrNativeBackendDisabled)
}

// SetReg changes the value of the specified register.
func (thread *nativeThread) SetReg(regNum uint64, reg *op.DwarfRegister) error {
	panic(ErrNativeBackendDisabled)
}

// ReadMemory reads len(buf) bytes at addr into buf.
func (t *nativeThread) ReadMemory(buf []byte, addr uint64) (int, error) {
	panic(ErrNativeBackendDisabled)
}

// WriteMemory writes the contents of data at addr.
func (t *nativeThread) WriteMemory(addr uint64, data []byte) (int, error) {
	panic(ErrNativeBackendDisabled)
}

func (t *nativeThread) resume() error {
	panic(ErrNativeBackendDisabled)
}

func (*processGroup) singleStep(*nativeThread) error {
	panic(ErrNativeBackendDisabled)
}

func (t *nativeThread) restoreRegisters(sr proc.Registers) error {
	panic(ErrNativeBackendDisabled)
}

func (t *nativeThread) withDebugRegisters(f func(*amd64util.DebugRegisters) error) error {
	return proc.ErrHWBreakUnsupported
}

// Stopped returns whether the thread is stopped at
// the operating system level.
func (t *nativeThread) Stopped() bool {
	panic(ErrNativeBackendDisabled)
}

// SoftExc returns true if this thread received a software exception during the last resume.
func (t *nativeThread) SoftExc() bool {
	panic(ErrNativeBackendDisabled)
}

func initialize(dbp *nativeProcess) (string, error) { return "", nil }