Skip to content

Commit b7869de

Browse files
authored
Fix broken link & Qemu Monitor Over Telnet (dreamportdev#100)
* Fix Broken Link | H_Useful_Resources.md * Tellnet | F_Debugging.md * Styling Fixes | Update F_Debugging.md * Consistency | Update F_Debugging.md
1 parent 8f58715 commit b7869de

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

99_Appendices/F_Debugging.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,9 @@ While debugging with gdb, we may want to keep qemu hanging after a triple fault
198198

199199
### Qemu Monitor
200200

201-
Qemu monitor is a tool used to send complex commands to the qemu emulator, is useful to for example add/remove media images to the system, freeze/unfreeze the VM, and to inspect the state of the virtual machine without using an external debugger.
201+
Qemu monitor is a tool used to send complex commands to the Qemu emulator, is useful to add/remove media images to the system, freeze/unfreeze the VM, and inspect the virtual machine's state without using an external debugger.
202202

203-
One way to start Qemu monitor on a unix system is using the following parameter when starting qemu:
203+
One way to start Qemu monitor on a unix system is using the following parameter when starting Qemu:
204204

205205
```bash
206206
qemu-system-i386 [..other params..] -monitor unix:qemu-monitor-socket,server,nowait
@@ -212,19 +212,30 @@ then on another shell, on the same folder where we started the emulator launch t
212212
socat -,echo=0,icanon=0 unix-connect:qemu-monitor-socket
213213
```
214214

215-
This will prompt with a shell similar to the following:
215+
216+
Another method is to use Telnet to start the monitor. This is handy for easier, cross-platform or remote use (albeit less secure).
217+
218+
```bash
219+
qemu-system-i386 [..other params..] -monitor telnet::45454,server,nowait
220+
```
221+
222+
This enables the monitor to listen on a specified port (ie, 45454). You can then connect to the QEMU monitor from another terminal or a remote machine (with networking setup) using Telnet:
223+
224+
```bash
225+
telnet localhost 45454
226+
```
227+
228+
Both of these will prompt with a shell similar to the following:
216229

217230
```bash
218-
username@host:~/yourpojectpath/$ socat -,echo=0,icanon=0 unix-connect:qemu-monitor-socket
219231
QEMU 6.1.0 monitor - type 'help' for more information
220232
(qemu)
221-
222233
```
223234

224-
From here is possible to send commands directly to the emulator, below a list of useful commands:
235+
Once the monitor is running, it is possible to send commands directly to the emulator, below is a list of useful commands:
225236

226-
* `help` Well this is the first command to get some help on how to use the monitor.
227-
* `info xxxx` It will print several information, depending on xxxx for example: `info lapic` will show the current status of the local apic, `info mem` will print current virtual memory mappings, `info registers` will print the registers content.
237+
* `help` This is the first command to get some help using the monitor.
238+
* `info xxxx` It will print information, depending on xxxx for example: `info lapic` will show the current status of the local apic, `info mem` will print current virtual memory mappings, `info registers` will print the content of the registers.
228239
* `x /cf address` where c is the number of items we want to display in decimal, f is the format (`x` for hex, `c` for char, etc) display the content of c virtual memory locations starting from address.
229240
* `xp /cf address` same as above, but for physical memory.
230241

99_Appendices/H_Useful_Resources.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ This appendix is a collection of links we found useful developing our own kernel
3333

3434
## Video Output
3535

36-
- JMNL.xyz blog post about creating a ui: [https://jmnl.xyz/window-manager/](https://jmnl.xyz/window-manager/]
36+
- JMNL.xyz blog post about creating a ui: [https://jmnl.xyz/window-manager/](https://jmnl.xyz/window-manager/)
3737
- Osdev wiki page for PSF format: [https://wiki.osdev.org/PC_Screen_Font](https://wiki.osdev.org/PC_Screen_Font)
3838
- gbdfed - Tool to inspect PSF files: [https://github.com/andrewshadura/gbdfed](https://github.com/andrewshadura/gbdfed)
3939
- PSF Formats: [https://www.win.tue.nl/~aeb/linux/kbd/font-formats-1.html](https://www.win.tue.nl/~aeb/linux/kbd/font-formats-1.html)

0 commit comments

Comments
 (0)