================
@@ -58,24 +72,28 @@ DataBreakpointInfoRequestHandler::Run(
if (data.IsValid()) {
size = llvm::utostr(data.GetByteSize());
addr = llvm::utohexstr(load_addr);
- lldb::SBMemoryRegionInfo region;
- lldb::SBError err =
- dap.target.GetProcess().GetMemoryRegionInfo(load_addr, region);
- // Only lldb-server supports "qMemoryRegionInfo". So, don't fail this
- // request if SBProcess::GetMemoryRegionInfo returns error.
- if (err.Success()) {
- if (!(region.IsReadable() || region.IsWritable())) {
- is_data_ok = false;
- response.description = "memory region for address " + addr +
- " has no read or write permissions";
- }
+ if (!IsRW(dap, load_addr)) {
+ is_data_ok = false;
+ response.description = "memory region for address " + addr +
+ " has no read or write permissions";
}
} else {
is_data_ok = false;
response.description =
"unable to get byte size for expression: " + args.name;
}
}
+ } else if (args.asAddress) {
+ size = llvm::utostr(args.bytes.value_or(1));
----------------
da-viper wrote:
```suggestion
size = llvm::utostr(args.bytes.value_or(dap.target.GetAddressByteSize()));
```
https://github.com/llvm/llvm-project/pull/167237
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits