Commit Graph

8 Commits

Author SHA1 Message Date
025913a734 Fix string_view constructor for macOS clang
Some versions of clang 14 (macOS+android) don't implement
`string_view(It first, It last)`, so let's use
`string_view(const CharT*, size_type)` instead.

Also remove unused header leftover from old code that uses std::string.
2023-04-11 10:06:08 -04:00
4cc181e5b8 Address review comments
Use more modern C++ style casts + std::array, clean up some log
messages, and rename some functions.
2023-04-05 12:41:17 -04:00
6e45de760e Cleanup new code, add docs and error handling 2023-04-04 13:13:24 -04:00
83138e0c63 Fix some build + impl errors with HIO
After rebase there were some API changes, also fix continuation logic in
the main gdbstub.
2023-03-31 14:05:57 -04:00
f92f494cab Stop execution when performing HIO request
Since the HIO request is basically treated like a syscall, we need to
stop emulation while waiting for the GDB client to reply with the
result. This ensures any memory queries etc. that GDB makes to fulfill
the HIO request are accessing memory as it was at the time of the
request, instead of afterwards.
2023-03-29 09:09:32 -04:00
b9c11e71d7 Fix ABI mismatch in packed HIO request
Using size_t etc. is incorrect, since these definitions are based on the
build machine which most likely has a different arch than the 3DS.
2023-03-29 09:09:32 -04:00
7de1bf3746 Properly parse incoming hio packet
This also does kind of a hacky way of sending HIO requests, since we
don't have a direct way of signaling a request should be sent like the
Rosalina implementation.

To improve this, it could probably do some kind of signal sending which
the main run loop handles instead of GDBStub::HandlePacket();
2023-03-29 09:09:32 -04:00
6f23ee43ae Initial port of luma3ds' gdb_hio to Citra 2023-03-29 09:09:32 -04:00