https://github.com/DavidSpickett commented:
I started to comment on some style issues here then realised that this code is adapted from `lldb/source/Plugins/Process/Utility/NativeRegisterContextDBReg_arm64.cpp` and I think about 90% of it is the same. I would prefer that you extract the generic parts of the code into a generic `NativeRegisterContextDBReg` then have Arm64 and LoongArch specialise that. It's one more level of classes in an already deep hierarchy but in this case I think the overlap is large enough to justify it. This also solves little things like the name of `g_enable_bit` being too generic for a global in a file that does things other than breakpoints. If it's in a file specific to breakpoints, the name is ok. `GetWatchpointSize` is an example of something that will need to be per architecture but `ClearHardwareBreakpoint` is the same for both so it can go in a base class. https://github.com/llvm/llvm-project/pull/118043 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits