================
@@ -16,12 +15,61 @@
 
 namespace lldb_dap {
 
+static llvm::Expected<protocol::DataBreakpointInfoResponseBody>
+HandleDataBreakpointBytes(DAP &dap,
+                          const protocol::DataBreakpointInfoArguments &args) {
+  llvm::StringRef address = args.name;
+
+  unsigned long long load_addr = LLDB_INVALID_ADDRESS;
+  if (llvm::getAsUnsignedInteger(address, 0, load_addr)) {
+    return llvm::make_error<DAPError>(llvm::formatv("invalid address"),
+                                      llvm::inconvertibleErrorCode(), false);
+  }
+
+  lldb::SBAddress sb_addr(load_addr, dap.target);
----------------
ashgti wrote:

nit: Could we rename `address` above to `raw_address` or remove the variable? 
Its only used on line 24, which could use `args.name` as the first param 
instead. Then we can use `addr` or `address` here.

https://github.com/llvm/llvm-project/pull/141122
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to