From 6bc2b959131048556016caa28d796d3e1648e860 Mon Sep 17 00:00:00 2001 From: Lizzie Date: Thu, 24 Jul 2025 04:20:04 +0200 Subject: [PATCH] [docs] update script --- docs/Development.md | 160 +++++++++++++++++++++++++++++++------------- 1 file changed, 112 insertions(+), 48 deletions(-) diff --git a/docs/Development.md b/docs/Development.md index 1542c2932a..2358bcbb49 100644 --- a/docs/Development.md +++ b/docs/Development.md @@ -1,56 +1,120 @@ -# Development -* **Windows**: [Windows Building Guide](./docs/build/Windows.md) -* **Linux**: [Linux Building Guide](./docs/build/Linux.md) -* **Android**: [Android Building Guide](./docs/build/Android.md) -* **Solaris**: [Solaris Building Guide](./docs/build/Solaris.md) -* **FreeBSD**: [FreeBSD Building Guide](./docs/build/FreeBSD.md) -* **macOS**: [macOS Building Guide](./docs/build/macOS.md) - -# How to test JIT - -## gdb - -Run `./build/bin/eden-cli -c -d -g ` - -Then hook up an aarch64-gdb (use `yay aarch64-gdb` or `sudo pkg in arch64-gdb` to install) -Then type `target remote localhost:1234` and type `c` (for continue) - and then if it crashes just do a `bt` (backtrace) and `layout asm`. - -### gdb cheatsheet - -- `c`: Continue -- `p `: Print variable, `p/x ` for hexadecimal. -- `r`: Run -- `bt`: Print backtrace -- `info threads`: Print all active threads -- `thread `: Switch to the given thread (see `info threads`) -- `layout asm`: Display in assembly mode (TUI) -- `si`: Step assembly instruction -- `s` or `step`: Step over LINE OF CODE (not assembly) -- `display `: Display variable each step. -- `n`: Next (skips over call frame of a function) -- `frame `: Switches to the given frame (from `bt`) -- `br `: Set breakpoint at ``. -- `delete`: Deletes all breakpoints. -- `catch throw`: Breakpoint at throw. Can also use `br __cxa_throw` - -Expressions can be `variable_names` or `1234` (numbers) or `*var` (dereference of a pointer) or `*(1 + var)` (computed expression). - -For more information type `info gdb` and read [the man page](https://man7.org/linux/man-pages/man1/gdb.1.html). - -# Bisecting - -Each commit should be buildable (independently) so bisecting is easier. See [git-bisect](https://git-scm.com/docs/git-bisect) for more information. - -## Notes +## Bisecting older commits Since going into the past can be tricky (especially due to the dependencies from the project being lost thru time). This should "restore" the URLs for the respective submodules. ```sh #!/bin/sh -rm .gitmodules -wget -O .gitmodules https://git.eden-emu.dev/eden-emu/eden/raw/branch/master/.gitmodules -git submodule update --init --recursive +cat > .gitmodules < externals/dynarmic/src/dynarmic/common/x64_disassemble.cpp < +#include +#include +namespace Dynarmic::Common { +void DumpDisassembledX64(const void* ptr, size_t size) {} +std::vector DisassembleX64(const void* ptr, size_t size) { return {}; } +} +EOF ``` -If you're not on Linux I'm sorry for you. Git gud. +If having issues with older artifacts, then run `rm -r externals/dynarmic/build externals/dynarmic/externals externals/nx_tzdb/tzdb_to_nx/externals externals/sirit/externals`. + +Configuring CMake with `-DSIRIT_USE_SYSTEM_SPIRV_HEADERS=1 -DCMAKE_CXX_FLAGS="-Wno-error" -DCMAKE_C_FLAGS="-Wno-error -Wno-array-parameter -Wno-stringop-overflow"` is also recommended. +