[Lldb-commits] [PATCH] D147820: debugserver: move AArch64 watchpoint traps within a watchpointed region, parse ESR flags and send them to lldb
Jason Molenda via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Apr 10 14:44:03 PDT 2023
jasonmolenda added a comment.
Thanks for the review. Will update the patch.
================
Comment at: lldb/tools/debugserver/source/MacOSX/MachException.cpp:162-169
+ if (exc_type == EXC_BREAKPOINT && exc_data[0] == EXC_ARM_DA_DEBUG &&
+ exc_data.size() > 1) {
+ stop_info->reason = eStopTypeWatchpoint;
+ stop_info->details.watchpoint.mach_exception_addr = exc_data[1];
+ stop_info->details.watchpoint.addr = INVALID_NUB_ADDRESS;
+ if (exc_data.size() >= 3) {
+ stop_info->details.watchpoint.hw_idx = exc_data[2];
----------------
JDevlieghere wrote:
> Interesting that you picked `> 1` on line 163 and `>= 3` on line 168.
Yeah I should check for `> 2` in the first conditional expression, because I"m going to access `exc_data[1]`. The third element (`exc_data[2]`) with the watchpoint number is optional and may not be provided in the mach exception.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147820/new/
https://reviews.llvm.org/D147820
More information about the lldb-commits
mailing list