[Lldb-commits] [PATCH] D143215: Separate Process::GetWatchpointSupportInfo into two methods to get the two separate pieces of information

Jason Molenda via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 6 23:01:19 PST 2023


jasonmolenda updated this revision to Diff 495385.
jasonmolenda edited the summary of this revision.
jasonmolenda added a comment.

David's feedback was spot on, overhaul patch to address.

Change Process::GetWatchpointSlotCount to return an optional count, for when it is available, instead of depending on a magic number.

I've been unhappy with how we calculate if a target reports watchpoint exceptions before or after the instruction has executed.  I believe it is target arch specific, I don't think we have any processors that change behavior at runtime. We originally homed this bit of information in debugserver and had it report it in qHostInfo, but it was one of those early decisions that was not correct IMO, and I'm not in favor of perpetuating it.  This update to the patch makes a concrete Process::GetWatchpointReportedAfter method that uses the Target architecture to determine it.  It also has a call to a `DoGetWatchpointReportedAfter` method that subclasses can override if they are an environment where the target arch determination is not sufficient - who knows.

I changed the gdb-remote plugin to only return the override when the qHostInfo key is


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143215/new/

https://reviews.llvm.org/D143215

Files:
  lldb/include/lldb/Target/Process.h
  lldb/source/API/SBProcess.cpp
  lldb/source/Commands/CommandObjectWatchpoint.cpp
  lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
  lldb/source/Plugins/Process/Windows/Common/ProcessWindows.h
  lldb/source/Plugins/Process/Windows/Common/RegisterContextWindows.h
  lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
  lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
  lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
  lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
  lldb/source/Target/Process.cpp
  lldb/source/Target/StopInfo.cpp
  lldb/source/Target/Target.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143215.495385.patch
Type: text/x-patch
Size: 16547 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230207/6516631e/attachment-0001.bin>


More information about the lldb-commits mailing list