================
@@ -229,3 +231,12 @@ Instruction *ArchitectureMips::GetInstructionAtAddress(
return nullptr;
}
+
+bool ArchitectureMips::IsValidBreakpointInstruction(
+ llvm::ArrayRef<uint8_t> reference, llvm::ArrayRef<uint8_t> observed) const
{
+ // The middle twenty bits of BREAK can be anything, so zero them
+ uint32_t mask = 0xFC00003F;
+ auto ref_bytes = llvm::support::endian::read32le(reference.data());
+ auto bytes = llvm::support::endian::read32le(observed.data());
+ return (ref_bytes & mask) == (bytes & mask);
+}
----------------
DavidSpickett wrote:
I have a feeling there's more than one encoding for MIPS given the
MicroMIPS/MIPS16E/NanoMIPS history, but I'm not going to ask you to deal with
that because:
1. I have long forgotten what they all are
2. We don't see much use of LLDB on MIPS these days, so they could be silently
wrong
If you'd ignored MIPS I wouldn't have asked you to change it at all, but I
think what you've added is fine. Thanks for making the effort.
https://github.com/llvm/llvm-project/pull/174348
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits