[Lldb-commits] [lldb] [lldb] Claim to support swbreak and hwbreak packets when debugging a gdbremote (PR #102873)
Jason Molenda via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 13 09:17:07 PDT 2024
https://github.com/jasonmolenda commented:
Thanks for writing up the patch. We do see some handling of this behavior for x86 in lldb, e.g. ProcessWindowsNative, and KDP protocol support with x86 Darwin kernel debugging, also `breakpoint-pc-offset` in ProcessGDBRemote. But we do assume that the pc value reported by a thread that hit a breakpoint will be the start of the breakpoint instruction, not the end.
The only question I have is -- if we are talking to a stub that supports `swbreak`/`hwbreak`, and we get a stop packet *without* those that hit a breakpoint, do we need to decr the pc value? I'm guessing gdbserver et al don't report a `reason:breakpoint` key-value pair in the stop packet. Should we treat the presence of `swbreak` or `hwbreak` as equivalent to receiving a `reason:breakpoint` in the packet (see the `reason` argument passed to `ProcessGDBRemote::SetThreadStopInfo`) to unambiguously indicate that a breakpoint was hit by this thread?
https://github.com/llvm/llvm-project/pull/102873
More information about the lldb-commits
mailing list