[Lldb-commits] [lldb] [lldb][Process/Linux] Introduce LoongArch64 hw break/watchpoint support (PR #118043)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Mon Dec 2 05:28:26 PST 2024
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
More information about the lldb-commits
mailing list