rpcs3
rpcs3 copied to clipboard
jit: fix assertion in GDBJITRegistrationListener
This fixes the assertion Second attempt to perform debug registration. which happens in GDBJITRegistrationListener. It happens on Linux if compiled in debug mode.
auto cache = ObjectCache::load(path);
This variable contains the code. A reference to it is added to the JIT compiler and then it is destroyed at the end of the function jit_compiler::add and the JIT compiler now has a reference to destroyed code.
I changed it to pass the ownership of the code to the JIT compiler.