Merge pull request #12261 from TryTwo/Bugfix_GetAddress

PPCDebugInterface:  Tweak regex in GetMemoryAddressFromInstruction to fix bugs
This commit is contained in:
Admiral H. Curtiss 2023-10-30 10:49:13 +01:00 committed by GitHub
commit 03f8ec09eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -444,7 +444,7 @@ std::string PPCDebugInterface::GetDescription(u32 address) const
std::optional<u32>
PPCDebugInterface::GetMemoryAddressFromInstruction(const std::string& instruction) const
{
static const std::regex re(",[^r0-]*(-?)(0[xX]?[0-9a-fA-F]*|r\\d+)[^r^s]*.(p|toc|\\d+)");
static const std::regex re(",[^r0-]*(-?)(?:0[xX])?([0-9a-fA-F]+|r\\d+)[^r^s]*.(p|toc|\\d+)");
std::smatch match;
// Instructions should be identified as a load or store before using this function. This error