Commit graph

612 commits

Author SHA1 Message Date
svc64
13c53657cc Fix the kill command, improve stepping 2024-08-24 18:51:12 +03:00
svc64
055ac70eaa Kill command - stop emulation 2024-08-24 18:50:51 +03:00
svc64
38c15faacf Remove useless definitions 2024-08-24 17:53:09 +03:00
svc64
1684a9d7a2 Fix GDB server crashes 2024-08-24 17:53:09 +03:00
svc64
e3b8060417 Refactor the debugger interface
Also support stepping through blocking syscalls
2024-08-24 17:53:09 +03:00
svc64
0f50273d4f Fix GDB stub settings 2024-08-24 17:53:09 +03:00
svc64
f934d23de4 (Hopefully) Properly check if the thread is blocked when stepping 2024-08-24 17:53:09 +03:00
svc64
144aa2f5b1 Fix stepping with JIT 2024-08-24 17:53:09 +03:00
svc64
edbd4bfc29 Revert "Return the address of the current instruction in EmitSynchronization"
This reverts commit 1331589a22ccf21c02951db96d0335a10738ae4c.
2024-08-24 17:53:09 +03:00
svc64
5d42332d75 Don't step when the thread is blocked 2024-08-24 17:53:09 +03:00
svc64
de4ec65bd7 Handle GDB server reconnections 2024-08-24 17:53:09 +03:00
svc64
5e65fd8808 Reply with an error if we fail to step 2024-08-24 17:53:09 +03:00
svc64
6ecc829516 Clarify StepBarrier 2024-08-24 17:53:09 +03:00
svc64
bc0ba93e92 Remove old variable 2024-08-24 17:53:09 +03:00
svc64
0c57663ea3 Add comments on debug stuff & fix warnings 2024-08-24 17:53:09 +03:00
svc64
65d7a16a87 Debugger refactor 2024-08-24 17:53:09 +03:00
svc64
81c399ec3e Better locking in debug methods 2024-08-24 17:53:09 +03:00
svc64
40584e0e45 HvExecutionContext: fix DebugPc 2024-08-24 17:53:09 +03:00
svc64
ac438d6572 KThread based debug
This commit starts a big refactor to the original debugger PR by merryhime. The debugger now interfaces with KThreads instead of the ExecutionContext.

The corresponding KThread debug functions properly suspend/resume the thread and call the underlying debug related function in the ExecutionContext.

I also added debugging support to the AppleHV ExecutionContext.
2024-08-24 17:53:09 +03:00
svc64
841aa89581 Return the address of the current instruction in EmitSynchronization 2024-08-24 17:53:09 +03:00
svc64
fc361f82a7 Don't recreate the GDB server socket 2024-08-24 17:53:09 +03:00
svc64
917a292256 Initialize the debugger before HOS 2024-08-24 17:53:09 +03:00
merry
5583a60ace stepping is less screwed up now 2024-08-24 17:53:09 +03:00
merry
8bd4417b24 Implement qThreadExtraInfo 2024-08-24 17:53:09 +03:00
svc64
7e4944cc88 Make DebugState public and remove AppleHV's DebugState 2024-08-24 17:53:09 +03:00
merry
5a34d80f98 Restart socket when able 2024-08-24 17:53:09 +03:00
merry
1cef40131a Support vectors in write registers
# Conflicts:
#	src/Ryujinx.HLE/Debugger/Debugger.cs
2024-08-24 17:53:09 +03:00
merry
a9538a54ff cleanup 2024-08-24 17:53:09 +03:00
merry
3bdf9d9805 Implement binary data escaping 2024-08-24 17:53:09 +03:00
merry
09a63ba2b5 Notify debugger on BRK instruction
# Conflicts:
#	src/Ryujinx.HLE/Debugger/Debugger.cs
#	src/Ryujinx.HLE/Debugger/Message/ThreadBreakMessage.cs
#	src/Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs
2024-08-24 17:53:09 +03:00
svc64
9b9137bf0a Log GDB server exceptions 2024-08-24 17:53:09 +03:00
svc64
a366890cb5 Fix spacing 2024-08-24 17:53:09 +03:00
svc64
a6cbb89996 Don't store ThreadUid in the shadow context and/or vcpu 2024-08-24 17:53:09 +03:00
svc64
d0fbcced57 Put ThreadUid in the execution context classes 2024-08-24 17:53:09 +03:00
merry
54bf7507d7 Call InvalidateCacheRegion
# Conflicts:
#	Ryujinx.HLE/HOS/ArmProcessContext.cs
#	src/Ryujinx.HLE/Debugger/Debugger.cs
#	src/Ryujinx.HLE/Debugger/IDebuggableProcess.cs
#	src/Ryujinx.HLE/HOS/Horizon.cs
#	src/Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs
2024-08-24 17:53:09 +03:00
merry
1b9753d42a Debugger: Fixups from testing with GDB
# Conflicts:
#	src/Ryujinx.HLE/Debugger/Debugger.cs
2024-08-24 17:53:09 +03:00
merry
a1de4f1b5b Debugger: Do more stuff
# Conflicts:
#	src/Ryujinx.HLE/Debugger/Debugger.cs
#	src/Ryujinx.HLE/Debugger/GdbXml/aarch64-core.xml
#	src/Ryujinx.HLE/Debugger/GdbXml/aarch64-fpu.xml
#	src/Ryujinx.HLE/Debugger/GdbXml/target.xml
#	src/Ryujinx.HLE/Debugger/RegisterInformation.cs
2024-08-24 17:53:09 +03:00
merry
1bb8f6381c Debugger: Add replies for qGDBServerVersion, qHostInfo, qProcessInfo, qfThreadInfo, qsThreadInfo 2024-08-24 17:53:09 +03:00
merry
deccf05e60 SDL2: Add GDB stub options to SDL2 frontend
# Conflicts:
#	src/Ryujinx.Headless.SDL2/Program.cs
2024-08-24 17:53:09 +03:00
merry
6edc00ec9c Debugger: Initial implementation
# Conflicts:
#	src/Ryujinx.HLE/Debugger/Debugger.cs
#	src/Ryujinx.HLE/Debugger/GdbSignal.cs
#	src/Ryujinx.HLE/Debugger/Message/AbortMessage.cs
#	src/Ryujinx.HLE/Debugger/Message/BreakInMessage.cs
#	src/Ryujinx.HLE/Debugger/Message/CommandMessage.cs
#	src/Ryujinx.HLE/Debugger/Message/IMessage.cs
#	src/Ryujinx.HLE/Debugger/Message/SendNackMessage.cs
#	src/Ryujinx.HLE/Debugger/StringStream.cs
#	src/Ryujinx.HLE/Switch.cs
2024-08-24 17:53:09 +03:00
merry
2a17f1314d Configuration: Add GDB stub related configuration
# Conflicts:
#	Ryujinx/Configuration/ConfigurationState.cs
#	src/Ryujinx.HLE/HLEConfiguration.cs
#	src/Ryujinx.Ui.Common/Configuration/ConfigurationFileFormat.cs
#	src/Ryujinx/Ui/MainWindow.cs
#	src/Ryujinx/Ui/Windows/SettingsWindow.cs
#	src/Ryujinx/Ui/Windows/SettingsWindow.glade
2024-08-24 17:53:09 +03:00
merry
20bdea45fa Logging: Add GdbStub LogClass
# Conflicts:
#	src/Ryujinx.Common/Logging/LogClass.cs
2024-08-24 17:53:09 +03:00
merry
569d01823e ARMeilleure: Add debuggable CPU loop
# Conflicts:
#	src/ARMeilleure/Optimizations.cs
#	src/ARMeilleure/Translation/ArmEmitterContext.cs
2024-08-24 17:53:09 +03:00
merry
39a3ba8329 IDebuggableProcess: Create and expose interface to enable implementation of debugging tools
# Conflicts:
#	src/ARMeilleure/State/DebugState.cs
#	src/ARMeilleure/State/ExecutionContext.cs
TODO: Fix comments. I also tried implementing AppleHV primitives here (it's actually broken).
2024-08-24 17:53:09 +03:00
gdkchan
460f9faf4e
Fix NRE when using buffer image array (#7159) 2024-08-21 00:49:17 +01:00
Tsubasa0504
0137c9e635
nim:eca : Stub CreateServerInterface2 (#7128)
* Add files via upload

* Add files via upload

* Update src/Ryujinx.HLE/HOS/Services/Nim/IShopServiceAccessServerInterface.cs

---------

Co-authored-by: Ac_K <Acoustik666@gmail.com>
2024-08-17 09:57:22 +01:00
Logan Stromberg
23fa5f4c9c
Fix arbitrary game ordering when sorting by Favorites (#7170)
* Fix arbitrary sorting by "Favorite" in the UI by making it the same as sorting alphabetically while giving favorites priority.

* Use a more engineered solution rather than string hacks.

* Address code style warnings. Add null checking. Make title name comparison case insensitive.

* one more style fix

---------

Co-authored-by: Logan Stromberg <lostromb@microsoft.com>
2024-08-13 15:23:11 +02:00
gdkchan
4f75e26ec7
Clamp amount of mipmap levels to max allowed for all backends (#7197)
* Clamp amount of mipmap levels to max allowed for all backends

* XML docs

* Remove using
2024-08-12 17:45:25 -03:00
gdkchan
8d8983049e
Implement UQADD16, UQADD8, UQSUB16, UQSUB8, VQRDMULH, VSLI and VSWP Arm32 instructions (#7174) 2024-08-08 17:07:24 -03:00
jhorv
7969fb6bba
Replace and remove obsolete ByteMemoryPool type (#7155)
* refactor: replace usage of ByteMemoryPool with MemoryOwner<byte>

* refactor: delete unused ByteMemoryPool and ByteMemoryPool.ByteMemoryPoolBuffer types

* refactor: change IMemoryOwner<byte> return types to MemoryOwner<byte>

* fix(perf): get span via `MemoryOwner<T>.Span` directly instead of `MemoryOwner<T>.Memory.Span`

* fix(perf): get span via MemoryOwner<T>.Span directly instead of `MemoryOwner<T>.Memory.Span`

* fix(perf): get span via MemoryOwner<T>.Span directly instead of `MemoryOwner<T>.Memory.Span`
2024-08-05 21:09:08 -03:00