Commit graph

55 commits

Author SHA1 Message Date
RipleyTom
cd87a64621 Headers cleanup 2025-02-11 20:38:35 +01: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
Megamouse
9a8ed80026 memory_viewer_panel: use existing thread_class instead of extra enum 2024-05-18 16:16:08 +02:00
Megamouse
dfee5b9a6c threads: replace magic number id_type with thread_class 2024-05-18 16:16:08 +02:00
Megamouse
d119cf6e96 Qt6 port 2023-07-31 20:03:24 +03:00
Megamouse
e8ee5831d3 Qt: add validator to patch creator offset lineedit 2023-07-13 08:40:19 +02:00
Eladash
8d54ddf426 memory viewer: Add RegEx instruction searching mode 2023-07-07 16:03:08 +03:00
Eladash
00cca7be69 Utilities/Memory Viewer: Improve image viewer
* Added image scaling with Ctrl+Plus, Ctrl+Minus.
* Added hover position to see which address is being pointed at, when double clicking on it the image viewer is closed and the memory viewer jumps to the clicked memory data.
2023-06-21 22:28:52 +03:00
Eladash
0a43f69e87 Utilities/Memory Viewer: Add G8 and G32MAX image formats 2023-06-21 22:28:52 +03:00
Eladash
c84d2d895e Utilities/Memory Viewer: Add PageDown/PageUp scrolling
* F5 for single refresh.
2023-06-21 22:28:52 +03:00
Eladash
87d5f45277 Utilities/Memory Viewer: Fix memory leak 2023-06-21 22:28:52 +03:00
Eladash
18722d7874 Utilities/Memory Viewer: Add auto-refresh mode 2023-06-21 22:28:52 +03:00
Eladash
f5b9d86e42 Qt/Utilities: Merge memory viewer with searcher 2023-04-30 12:41:55 +02:00
Eladash
ec6d6adebc RSX Memory Viewer: Fix local memory displaying 2022-06-21 16:59:45 +03:00
Nekotekina
5c1f79ab26 vm: remove g_mutex, use g_range_lock instead
Simplification and performance improvements.
2022-05-02 10:29:28 +03:00
Megamouse
8d781a737b Qt: Replace some deprecated Qt5 stuff 2022-04-21 21:23:10 +02:00
Nekotekina
160b131de3 types.hpp: implement smin, smax, amin, amax
Rewritten the following global utility constants:
`umax` returns max number, restricted to unsigned.
`smax` returns max signed number, restricted to integrals.
`smin` returns min signed number, restricted to signed.
`amin` returns smin or zero, less restricted.
`amax` returns smax or umax, less restricted.

Fix operators == and <=> for synthesized rel-ops.
2021-05-22 12:10:57 +03:00
Megamouse
03b76b4606 Emu: some cleanup 2021-04-09 21:03:49 +02:00
Eladash
2005c89baa memory viewer: Implement RSX mode
* Set the ground for RSX modes of register editor and insttruction editor, do not use shared ptrs directly.
* Make register editor and instruction editor modeless to allow to copypaste values from thread context etc in the background.
2021-02-02 01:05:36 +03:00
Eladash
a742501a4f Do not account RSX for TSX pauses 2021-01-29 10:31:15 +03:00
Eladash
e05f1c37ad memory viewer: Close all instances after emulation exit 2021-01-12 23:57:36 +03:00
Eladash
c4c6dc19a5 memory viewer: Implement SPU mode, fix address GOTO 2020-12-30 15:42:56 +03:00
Eladash
87b6284275 memory viewer: Only allow "words" steps in powers of 2 2020-12-23 08:25:56 +03:00
Eladash
2c6b974f24 Fixup memory viewer SPU headers for RawSPU 2020-12-23 08:25:56 +03:00
Eladash
020acc8235 GUI: Rewrite GOTO address tools in debugger tools 2020-12-23 08:25:56 +03:00
Megamouse
066e53da55 minor cleanup 2020-12-19 08:33:53 +01:00
Eladash
c74b2cb085 memory viewer: Fix resizing down 2020-12-18 21:00:09 +01:00
Nekotekina
eec11bfba9 Move align helpers to util/asm.hpp
Also add some files:
GLTextureCache.cpp
VKTextureCache.cpp
2020-12-18 18:07:42 +03:00
Megamouse
908465b274 memory viewer: improve layout and resize 2020-12-18 09:58:12 +01:00
Megamouse
a7f10d142e fix warning 2020-12-18 09:58:12 +01:00
Megamouse
e855673802 memory viewer: check width and height in image viewer 2020-12-18 09:58:12 +01:00
Megamouse
112ac7bd13 memory viewer: fix RGB Image viewer crash 2020-12-18 09:58:12 +01:00
Megamouse
ec7963df3d memory viewer: use enum for color formats 2020-12-18 09:58:12 +01:00
Megamouse
ed8e5498d1 memory viewer: fix horrible overflow that freezes rpcs3 2020-12-18 09:58:12 +01:00
Megamouse
3cfead4ca6 memory viewer cleanup 2020-12-18 09:58:12 +01:00
Eladash
c8947eee6a GUI: Make memory viewer address edit accept 0x/0X prefixes
Max length is 10, added regexp validator accordinally.
2020-12-17 22:57:13 +01:00
Eladash
6c1ca7d797 GUI: Polish the memory viewer 2020-12-17 22:57:13 +01:00
Eladash
2172974db9 Link the memory viewer with the debugger 2020-12-17 19:36:35 +01:00
RipleyTom
af8c661a64 Remove BOM markers 2020-12-06 15:30:12 +03:00
Nekotekina
65c81c5e83 Fix memory viewer for SPU LS 2020-11-17 15:22:04 +03:00
Megamouse
078c31c1da Qt: fix lupdate warnings (used for translation) 2020-04-06 20:59:58 +02:00
Nick Renieris
1113221340 Qt/MemoryViewer: Make it vertically resizable 2020-04-03 01:36:35 +01:00
Eladash
e3668cc26c Fix a segfault in memory viewer
Also a memory leak.
2020-03-19 14:18:05 +03:00
Megamouse
f7666f44da Untangle GUI and input includes 2020-02-24 16:31:01 +01:00
Nekotekina
4bc431ec31 Silence deprecation warning (implicit capture of this on [=]) 2020-02-10 14:47:12 +03:00
Nekotekina
835892aa51 C-style cast cleanup VII 2019-12-05 02:10:15 +03:00
eladash
f349695a75 Rsx: rewrite address translation 2018-08-13 16:16:34 +03:00
Megamouse
cf1c45dfe8 Qt: use setAttribute(AA_DisableWindowContextHelpButton) instead of flags
probably needs Qt 5.10.1 to work propery
2018-02-22 00:18:14 +04:00
Megamouse
b3efa75206 [Qt] UI improvements (#3558)
* Qt: Show tooltips in description box

* Qt: implement description subscription

* Qt: add gamelist resize for ctrl-+/-/wheel (simple zoom)

* Qt: handle strict mode in gui tab

* Qt: more highdpi stuff

* Qt: remove old tooltips from settings_dialog

* Qt: conform cpublit tooltip to new subscription model
2017-10-19 14:29:48 +03:00
Megamouse
cf83b796e1 Qt: include debug tool colors in stylesheet (#3527)
Qt: include debug tool colors in stylesheet
2017-10-04 23:10:24 +01:00