-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
218 lines (218 loc) · 7.34 KB
/
Copy pathpackage.json
File metadata and controls
218 lines (218 loc) · 7.34 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
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
{
"name": "async-rust-debugger",
"displayName": "Async Rust Debugger",
"description": "Debug adapter for async Rust code with async inspector panel",
"version": "0.1.0",
"engines": {
"vscode": "^1.80.0"
},
"categories": [
"Debuggers"
],
"activationEvents": [
"*"
],
"main": "./out/extension.js",
"contributes": {
"debuggers": [
{
"type": "ardb",
"label": "ARD (Async Rust Debugger)",
"configurationAttributes": {
"launch": {
"required": [
"program"
],
"properties": {
"program": {
"type": "string",
"description": "Path to the Rust executable to debug",
"default": "${workspaceFolder}/target/debug/${workspaceFolderBasename}"
},
"args": {
"type": "array",
"description": "Command line arguments",
"default": []
},
"cwd": {
"type": "string",
"description": "Working directory",
"default": "${workspaceFolder}"
},
"env": {
"type": "object",
"description": "Environment variables"
}
}
},
"attach": {
"required": ["target", "cwd", "qemuPath", "qemuArgs"],
"properties": {
"target": {
"type": "string",
"description": "GDB remote connection string, e.g. \":1234\"",
"default": ":1234"
},
"cwd": {
"type": "string",
"description": "Working directory",
"default": "${workspaceFolder}"
},
"gdbpath": {
"type": "string",
"description": "Path to GDB executable (or wrapper script)",
"default": "gdb"
},
"debugger_args": {
"type": "array",
"description": "Extra arguments passed to GDB",
"default": []
},
"executable": {
"type": "string",
"description": "Path to ELF file for debug symbols (e.g. kernel binary)"
},
"autorun": {
"type": "array",
"description": "GDB commands to run after connecting",
"default": []
},
"stopAtConnect": {
"type": "boolean",
"description": "Whether to stop immediately after connecting to the remote target",
"default": false
},
"qemuPath": {
"type": "string",
"description": "Path to QEMU executable",
"default": "qemu-system-riscv64"
},
"qemuArgs": {
"type": "array",
"description": "Command-line arguments passed to QEMU",
"default": []
},
"program_counter_id": {
"type": "number",
"description": "Register ID of the program counter (32 for RISC-V)",
"default": 32
},
"first_breakpoint_group": {
"type": "string",
"description": "Name of the initial breakpoint group (typically \"kernel\")",
"default": "kernel"
},
"second_breakpoint_group": {
"type": "string",
"description": "Fallback breakpoint group name if the next group cannot be determined automatically"
},
"kernel_memory_ranges": {
"type": "array",
"description": "Kernel address ranges as [start, end) hex string pairs",
"default": [["0xefffffffffffffff", "0xffffffffffffffff"]]
},
"user_memory_ranges": {
"type": "array",
"description": "User address ranges as [start, end) hex string pairs",
"default": [["0x0000000000000000", "0xe000000000000000"]]
},
"border_breakpoints": {
"type": "array",
"description": "Border breakpoints that mark kernel↔user transitions",
"default": []
},
"hook_breakpoints": {
"type": "array",
"description": "Hook breakpoints with JS behavior for fetching the next process name",
"default": []
},
"filePathToBreakpointGroupNames": {
"type": "object",
"description": "JS function (as object with functionArguments/functionBody) mapping a file path to breakpoint group names"
},
"breakpointGroupNameToDebugFilePaths": {
"type": "object",
"description": "JS function (as object with functionArguments/functionBody) mapping a breakpoint group name to debug symbol file paths"
}
}
}
},
"initialConfigurations": [
{
"type": "ardb",
"request": "launch",
"name": "Launch Rust Program",
"program": "${workspaceFolder}/target/debug/${workspaceFolderBasename}"
},
{
"type": "ardb",
"request": "attach",
"name": "Attach via QEMU (OS Debug)",
"cwd": "${workspaceFolder}",
"target": ":1234",
"qemuPath": "qemu-system-riscv64",
"qemuArgs": [],
"executable": "${workspaceFolder}/os/target/riscv64gc-unknown-none-elf/release/os",
"first_breakpoint_group": "kernel",
"program_counter_id": 32,
"kernel_memory_ranges": [["0xefffffffffffffff", "0xffffffffffffffff"]],
"user_memory_ranges": [["0x0000000000000000", "0xe000000000000000"]]
}
]
}
],
"commands": [
{
"command": "ardb.openInspector",
"title": "Open Async Inspector",
"icon": "$(debug-console)"
},
{
"command": "ardb.traceFunction",
"title": "Trace Function",
"icon": "$(debug-start)"
},
{
"command": "ardb.setBorderBreakpointsFromLaunchJSON",
"title": "ARD: Set Border Breakpoints from launch.json"
},
{
"command": "ardb.setHookBreakpointsFromLaunchJSON",
"title": "ARD: Set Hook Breakpoints from launch.json"
},
{
"command": "ardb.setBreakpointAsBorder",
"title": "ARD: Set This Breakpoint as Border"
},
{
"command": "ardb.disableBorderOfThisBreakpointGroup",
"title": "ARD: Disable Border of This Breakpoint Group"
},
{
"command": "ardb.removeAllCliBreakpoints",
"title": "ARD: Remove All Breakpoints"
}
],
"menus": {
"editor/context": [
{
"command": "ardb.traceFunction",
"when": "editorLangId == rust"
}
]
}
},
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./"
},
"devDependencies": {
"@types/node": "^20.0.0",
"@types/vscode": "^1.80.0",
"typescript": "^5.0.0"
},
"dependencies": {
"@vscode/debugadapter": "^1.50.0"
}
}