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.
This commit is contained in:
Eladash 2021-01-14 19:54:27 +02:00 committed by Ivan
parent 8c6aa9db31
commit 2005c89baa
13 changed files with 320 additions and 122 deletions

View file

@ -43,7 +43,7 @@ namespace rsx
{
std::function<bool(u32 addr, bool is_writing)> g_access_violation_handler;
u32 get_address(u32 offset, u32 location, u32 line, u32 col, const char* file, const char* func)
u32 get_address(u32 offset, u32 location, bool allow_failure, u32 line, u32 col, const char* file, const char* func)
{
const auto render = get_current_renderer();
std::string_view msg;
@ -150,6 +150,11 @@ namespace rsx
}
}
if (allow_failure)
{
return 0;
}
fmt::throw_exception("rsx::get_address(offset=0x%x, location=0x%x): %s%s", offset, location, msg, src_loc{line, col, file, func});
}