Add WSL mapped drive and tracing info

This commit is contained in:
Mike Davis 2022-08-05 22:16:54 -05:00 committed by mborgerson
parent 8afbc75d38
commit 73d1e170b7
2 changed files with 16 additions and 7 deletions

View File

@ -13,7 +13,7 @@ To quickly diagnose a crash in guest code, one might execute the following GDB c
<!-- <!--
## GDB ## GDB
TODO TODO: WIP
## Ghidra ## Ghidra
@ -55,18 +55,26 @@ DEBUG_XID | hw/xbox/xid.c | Input
DEBUG_MCPX | hw/xbox/mcpx/apu.c | Audio DEBUG_MCPX | hw/xbox/mcpx/apu.c | Audio
DEBUG_DSP | hw/xbox/mcpx/dsp/dsp.c | Audio DEBUG_DSP | hw/xbox/mcpx/dsp/dsp.c | Audio
<!--
## Tracing ## Tracing
A more advanced version of logging can be accomplished via qemu's tracing infrastructure. Documentation for such is located underneath `docs/devel/tracing.rst`. Review the `trace-events` files within the source tree to see what's supported. A more advanced version of logging can be accomplished via qemu's tracing infrastructure. Review the `trace-events` files within the source tree to see what's supported. See also [QEMU user documentation](https://qemu-project.gitlab.io/qemu/devel/tracing.html){target=_blank} for more details.
#### Runtime Usage (preferred) #### Runtime Usage (preferred)
TODO: Launch xemu from a console window (cmd.exe, Terminal.app, bash, etc...; whichever is appropriate for your OS).
Open the monitor via <kbd>Debug</kbd> &rarr; <kbd>Monitor</kbd> in the xemu menu.
Enter `trace-event <trace_event> on` to turn on an event, `trace-event <trace_event> off` to turn one off, replacing `<trace_event>` with the name of the event you wish to toggle.
Examine the console where you launched xemu; trace messages will be written to `STDERR`.
The [nv2a events](https://github.com/mborgerson/xemu/blob/master/hw/xbox/nv2a/trace-events){target=_blank} are particularly interesting when debugging graphics issues, specifically the `nv2a_pgraph_*` subset. These may be toggled all at once using a wildcard. For example, `trace-event nv2a_pgraph_* on` will turn them all on.
#### Compile-Time Usage (deprecated) #### Compile-Time Usage (deprecated)
Append `--enable-trace-backends=simple` to the xemu build args to enable. Append `--debug --enable-trace-backends=simple` to the xemu build args to enable.
Edit the global `/tmp/events` file with things you intend to match on. Edit the global `/tmp/events` file with things you intend to match on.
@ -77,5 +85,4 @@ Edit the global `/tmp/events` file with things you intend to match on.
$ echo ahci* >> /tmp/events $ echo ahci* >> /tmp/events
$ cat /tmp/events $ cat /tmp/events
Then append `--trace events=/tmp/events` to the xemu runtime arguments. Once finished, run `python ./scripts/simpletrace.py trace-events-all trace-####` replacing `####` with the created trace log's ID. Then append `--trace events=/tmp/events` to the xemu runtime arguments. Once finished, run `python ./scripts/simpletrace.py trace-events-all trace-####` replacing `####` with the created trace log's ID.
-->

View File

@ -6,6 +6,8 @@ Install [VSCode](https://code.visualstudio.com/download){target=_blank} and the
=== "Windows" === "Windows"
Map a drive to the WSL2 root or your projects folder within. The particular path can be found by viewing `\\wsl$` in File Explorer and reviewing the folders (distros) underneath. For example, `net use w: \\wsl$\Ubuntu-20.04`.
Install [MSYS2](https://www.msys2.org/){target=_blank}, run the `MSYS2 MinGW 64-bit` shell, and install GDB. Install [MSYS2](https://www.msys2.org/){target=_blank}, run the `MSYS2 MinGW 64-bit` shell, and install GDB.
$ pacman -S mingw-w64-x86_64-gdb $ pacman -S mingw-w64-x86_64-gdb