[Lldb-commits] [lldb] [LLDB][Process/Utility] Introduce NativeRegisterContextDBReg class (PR #118043)

via lldb-commits lldb-commits at lists.llvm.org
Mon Dec 9 01:39:15 PST 2024


================
@@ -337,4 +354,471 @@ NativeRegisterContextLinux_loongarch64::GetExpeditedRegisters(
   return expedited_reg_nums;
 }
 
+uint32_t
+NativeRegisterContextLinux_loongarch64::NumSupportedHardwareBreakpoints() {
+  Log *log = GetLog(LLDBLog::Breakpoints);
+
+  // Read hardware breakpoint and watchpoint information.
+  Status error = ReadHardwareDebugInfo();
+
+  if (error.Fail()) {
+    LLDB_LOG(log, "failed to read debug registers");
+    return 0;
+  }
+
+  LLDB_LOG(log, "{0}", m_max_hbp_supported);
----------------
wangleiat wrote:

> Could we make the log message more readable? For example `Supported hardware breakpoints: {0}`

`LLDB_LOG` will output the function name, which is sufficient for logging.

https://github.com/llvm/llvm-project/pull/118043


More information about the lldb-commits mailing list