File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ For example, you can:
8
8
9
9
* Connect to Docker for Windows from the Linux Docker client in WSL
10
10
* Connect interactively to a Hyper-V Linux VM's serial console
11
+ * Use gdb to connect to debug the kernel of a Hyper-V Linux VM
11
12
12
13
Let me know on Twitter ([ @gigastarks ] ( https://twitter.com/gigastarks ) ) if you come up with more interesting uses.
13
14
@@ -137,7 +138,8 @@ Refer to your VM Linux distribution's instructions for enabling the serial conso
137
138
138
139
### Connecting to the serial port
139
140
140
- For this step, WSL must be running elevated
141
+ For this step, WSL must be running elevated or your Windows user must be in the
142
+ Hyper-V Administrators group.
141
143
142
144
#### Directly via socat
143
145
@@ -165,6 +167,18 @@ $ screen $HOME/foo-pty # Attaches to the serial
165
167
166
168
See the ` screen ` documentation (` man screen ` ) for more details.
167
169
170
+ ## Debugging the kernel of a Hyper-V Linux VM
171
+
172
+ Follow the same steps to enable the COM port for your VM, then run the serial
173
+ relay as though you were going to run ` screen ` to connect to the serial console.
174
+
175
+ Next, run gdb and connect to the serial port:
176
+
177
+ ``` bash
178
+ gdb ./vmlinux
179
+ target remote /home/< myuser> /foo-pty
180
+ ```
181
+
168
182
## Custom usage
169
183
170
184
Take a look at the scripts for sample usage, or run ` npiperelay.exe ` without any parameters for parameter documentation.
You can’t perform that action at this time.
0 commit comments