[Lldb-commits] [lldb] [LLDB][LoongArch] Extend the maximum number of watchpoints (PR #126204)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Fri Feb 7 01:38:05 PST 2025
================
@@ -50,6 +50,19 @@
#define REG_CONTEXT_SIZE \
(GetGPRSize() + GetFPRSize() + sizeof(m_lsx) + sizeof(m_lasx))
+// In order to avoid undefined or redefined error, just add a new struct
+// loongarch_user_watch_state in LLDB which is same with the uapi struct
+// user_watch_state_v2.
----------------
DavidSpickett wrote:
This should reference `user_watch_state` version 1 and say that all that changed is the size of dbg_regs. Something like:
```
// ptrace has a type user_watch_state, which was replaced by user_watch_state_v2 when more watchpoints
// were added. So this file may be built on systems with one or both in the headers. The type below has the same
// layout as user_watch_v2 but will not clash with that name if it exists. We can use the v2 layout even on old
// kernels as we will only see 8 watchpoints and the kernel will truncate any extra data we send to it.
```
https://github.com/llvm/llvm-project/pull/126204
More information about the lldb-commits
mailing list