Commit graph

156 commits

Author SHA1 Message Date
Megamouse 3c576da42f Move debugger functions to emu_utils.cpp 2025-02-25 19:45:43 +01:00
Elad c6dadc537b Add some FXO init checks 2024-12-24 21:31:57 +02:00
Elad 575a245f8d
IDM: Implement lock-free smart pointers (#16403)
Replaces `std::shared_pointer` with `stx::atomic_ptr` and `stx::shared_ptr`.

Notes to programmers:

* This pr kills the use of `dynamic_cast`, `std::dynamic_pointer_cast` and `std::weak_ptr` on IDM objects, possible replacement is to save the object ID on the base object, then use idm::check/get_unlocked to the destination type via the saved ID which may be null. Null pointer check is how you can tell type mismatch (as dynamic cast) or object destruction (as weak_ptr locking).
* Double-inheritance on IDM objects should be used with care, `stx::shared_ptr` does not support constant-evaluated pointer offsetting to parent/child type.
* `idm::check/get_unlocked` can now be used anywhere.

Misc fixes:
* Fixes some segfaults with RPCN with interaction with IDM.
* Fix deadlocks in access violation handler due locking recursion.
* Fixes race condition in process exit-spawn on memory containers read.
* Fix bug that theoretically can prevent RPCS3 from booting - fix `id_manager::typeinfo` comparison to compare members instead of `memcmp` which can fail spuriously on padding bytes.
* Ensure all IDM inherited types of base, either has `id_base` or `id_type` defined locally, this allows to make getters such as `idm::get_unlocked<lv2_socket, lv2_socket_raw>()` which were broken before. (requires save-states invalidation)
* Removes broken operator[] overload of `stx::shared_ptr` and `stx::single_ptr` for non-array types.
2024-12-22 20:59:48 +02:00
oltolm 2b0f786b2d
Fix std::basic_string warnings (#16261) 2024-11-11 21:54:44 +02:00
Megamouse 31b133b012 Fix yet another warning 2024-09-23 21:59:01 +02:00
Elad Ashkenazi 466a93dca5 Debugger: Fix thread-selection and refactoring 2024-09-20 23:52:37 +03:00
Megamouse d13acdb484 Fix some warning 2024-09-08 20:04:30 +02:00
Elad Ashkenazi 9385f0673b Debugger: Non-blocking thread list refresh 2024-09-06 20:28:11 +03:00
Megamouse deba582353 Qt: Force reset of debugger when a different game is running 2024-09-06 05:05:54 +03:00
Megamouse 303c6715dd Qt: Don't start the debug update timer in the constructor
This caused the timer to be active even when the debugger is initially hidden.
2024-09-06 05:05:54 +03:00
Megamouse 4a4762654b Qt: sync gui settings by default after setting or removing values 2024-08-26 06:28:47 +02:00
Elad Ashkenazi 1c16ada670 Debugger: Pointer comparison bugfix 2024-08-22 12:21:55 +03:00
Elad Ashkenazi d6acdc77e0 Debugger/SPU: Implement SPU Disassembler 2024-08-21 13:32:45 +03:00
Elad Ashkenazi d451c0867c Remove welcome dialog shortcut 2024-07-28 12:36:42 +03:00
Megamouse dfee5b9a6c threads: replace magic number id_type with thread_class 2024-05-18 16:16:08 +02:00
Megamouse 50214a6a07 Qt: use default colors for native styles 2023-12-22 10:03:56 +01:00
Megamouse a4bcba8971 Fix some warnings 2023-12-19 00:50:57 +01:00
Eladash eb407e3b5c SPU/MFC: Add block has to command history 2023-10-24 22:14:12 +03:00
Eladash 6908d20128 Debugger/PPU: Add Go-To from function pointer 2023-09-26 11:06:01 +03:00
Eladash 6dc9e9659d Debugger/Logs: Allow to display thread from thread ID on log 2023-09-26 11:06:01 +03:00
Eladash e79fc867c5 Patches: Add savable breakpoints patch type 2023-09-26 11:06:01 +03:00
Eladash 17302a9422 Debugger/PPU: Superior Callstack Detection 2023-08-20 22:43:41 +03:00
Ivan Chikish d34287b2cc Linux: use futex_waitv syscall for atomic waiting
In order to make this possible, some unnecessary features were removed.
2023-08-02 21:46:06 +03:00
Elad Ashkenazi 213b810279 Debugger: Transition to plain text edit 2023-07-31 08:53:10 +03:00
Talkashie dabb2cc9a0
Fix typos, improve consistency
Fixes typos where spelling or grammar is objectively wrong.
Changes wording and capitalization in some areas to be more consistent with other areas.
2023-07-28 13:09:06 +03:00
Megamouse e8ee5831d3 Qt: add validator to patch creator offset lineedit 2023-07-13 08:40:19 +02:00
Eladash c0280b43f2 PPU/Debugger: View the currently used CR field content in register panel 2023-07-12 13:22:06 +03:00
Elad Ashkenazi e882d64d8a SPU/PPU Debugger: Add decimal mode to registers panel 2023-07-10 19:06:57 +03:00
Eladash c21cdb8055 Implement PPU LV2 debug 2023-07-07 16:03:08 +03:00
Eladash 593f850693 Qt: Save UI settings and geometry safely on closeEvent 2023-06-29 14:02:25 +02:00
Eladash 137f37cd41 Debugger/RSX: Add shortcut for RSX semaphores 2023-06-21 22:28:52 +03:00
Megamouse 3f5bc3464d Rename ProcureCurrentEmulationCourseInformation to GetEmulationIdentifier
This is much easier to understand in my opinion.
The old name just made me scratch my head whenever I read it.
2023-06-08 21:15:39 +02:00
Megamouse fcd6be71b0 debugger_frame: don't query cpu thread if emulation is stopped anyway 2023-06-08 21:15:39 +02:00
Eladash ca56f0747e debugger: Avoid incorrect update timer restart 2023-06-05 17:39:52 +03:00
Eladash e77c01d00a debugger: Fix use of invalid pointers 2023-06-05 17:39:52 +03:00
Eladash 5a365506f7 Qt/Debugger: Add Ctrl+F (find thread), Ctrl+C (copy) 2023-05-28 13:53:35 +02:00
Eladash e1744ceab2 Debugger: Implement key-scrolling through threads 2023-05-19 23:15:40 +02:00
Elad Ashkenazi c70338a9a9 Logs/Debugger: Go-To-Address signal from log text 2023-05-18 08:43:39 +02:00
Eladash 514ef9a9c5 SPU Executable Code Dumping Tool 2023-05-15 14:11:13 +03:00
Eladash f5b9d86e42 Qt/Utilities: Merge memory viewer with searcher 2023-04-30 12:41:55 +02:00
Eladash 6bf77166e1 Game List: Make Ctrl+f Focus On The Search Bar 2023-04-22 16:13:17 +02:00
Elad Ashkenazi 7bce99d77b
Debugger: Fix step over (#13649) 2023-04-12 20:55:07 +02:00
Eladash 151a0955cf rsx: Implement draw call stepping 2022-12-10 15:09:42 +01:00
Eladash b01220d2c5 debugger: Don't refresh no-thread window at a high rate 2022-10-04 16:28:34 +03:00
Eladash 2759091ede Debugger: Rewind SPU captures
Very basic implementation, can be improved.
2022-09-25 14:31:39 +03:00
Eladash d30ac20fad Debugger: Fix and use centered PC by default
* Fix instruction-selection dependent functionality.
* Remove odd instruction position jumps in add/remove breakpoint.
* Make PC fixate at 1/3 of the frame because knowing future instructions is more important than knowing the previous.
2022-08-12 15:20:48 +03:00
Elad Ashkenazi bc3a899acf
Debugger: Simplify and optimize #12269 (#12275) 2022-06-24 11:26:44 +02:00
Eladash 5e01ffdfd8 Debugger: Optimize cpu_thread::dump_regs()
Reuse string buffer. Copies and reallocations are expensive with such large strings.
2022-06-23 22:41:32 +02:00
Eladash 794cbd8708 Debugger: Refresh at 100hz during debugger interaction (was 20hz) 2022-06-23 22:41:32 +02:00
Elad Ashkenazi 69ceebeb05
Debugger: Hide breakpoint and callstack list if unused (#12266) 2022-06-21 23:42:42 +02:00