-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy path_remote_debugging.rs
More file actions
107 lines (87 loc) · 2.49 KB
/
_remote_debugging.rs
File metadata and controls
107 lines (87 loc) · 2.49 KB
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
pub(crate) use _remote_debugging::module_def;
#[pymodule]
mod _remote_debugging {
use crate::vm::{
Py, PyObjectRef, PyResult, VirtualMachine,
builtins::PyType,
function::FuncArgs,
types::{Constructor, PyStructSequence},
};
#[pystruct_sequence_data]
struct FrameInfoData {
filename: String,
lineno: i64,
funcname: String,
}
#[pyattr]
#[pystruct_sequence(
name = "FrameInfo",
module = "_remote_debugging",
data = "FrameInfoData"
)]
struct FrameInfo;
#[pyclass(with(PyStructSequence))]
impl FrameInfo {}
#[pystruct_sequence_data]
struct TaskInfoData {
task_id: PyObjectRef,
task_name: PyObjectRef,
coroutine_stack: PyObjectRef,
awaited_by: PyObjectRef,
}
#[pyattr]
#[pystruct_sequence(name = "TaskInfo", module = "_remote_debugging", data = "TaskInfoData")]
struct TaskInfo;
#[pyclass(with(PyStructSequence))]
impl TaskInfo {}
#[pystruct_sequence_data]
struct CoroInfoData {
call_stack: PyObjectRef,
task_name: PyObjectRef,
}
#[pyattr]
#[pystruct_sequence(name = "CoroInfo", module = "_remote_debugging", data = "CoroInfoData")]
struct CoroInfo;
#[pyclass(with(PyStructSequence))]
impl CoroInfo {}
#[pystruct_sequence_data]
struct ThreadInfoData {
thread_id: PyObjectRef,
frame_info: PyObjectRef,
}
#[pyattr]
#[pystruct_sequence(
name = "ThreadInfo",
module = "_remote_debugging",
data = "ThreadInfoData"
)]
struct ThreadInfo;
#[pyclass(with(PyStructSequence))]
impl ThreadInfo {}
#[pystruct_sequence_data]
struct AwaitedInfoData {
thread_id: PyObjectRef,
awaited_by: PyObjectRef,
}
#[pyattr]
#[pystruct_sequence(
name = "AwaitedInfo",
module = "_remote_debugging",
data = "AwaitedInfoData"
)]
struct AwaitedInfo;
#[pyclass(with(PyStructSequence))]
impl AwaitedInfo {}
#[pyattr]
#[pyclass(name = "RemoteUnwinder", module = "_remote_debugging")]
#[derive(Debug, PyPayload)]
struct RemoteUnwinder {}
impl Constructor for RemoteUnwinder {
type Args = FuncArgs;
fn py_new(_cls: &Py<PyType>, _args: Self::Args, vm: &VirtualMachine) -> PyResult<Self> {
Err(vm.new_not_implemented_error("_remote_debugging is not available"))
}
}
#[pyclass(with(Constructor))]
impl RemoteUnwinder {}
}