[Lldb-commits] [lldb] [lldb] Claim to support swbreak and hwbreak packets when debugging a gdbremote (PR #102873)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 13 21:43:34 PDT 2024
xusheng6 wrote:
> Just to be clear, if I'm understanding the packet we'll be getting back, we have no indication that we hit the breakpoint, we only show that we are stopped at an address which has a breakpoint. Current lldb stepping behavior will work -- because the rule is, when we stop at a breakpoint address, we will say we hit the breakpoint. I am refining a patch #96260 which changes this behavior -- we handle "instruction stepped / stopped at a breakpoint" differently than "hit a breakpoint". I worry this difference will be lost with a stub that reports `swbreak`/`hwbreak`, stepping won't work correctly, and we won't capture it in the testsuite or on any of our CI bots.
My work mainly concerns the case when lldb is connected to a gdbserver, and as far as I can tell, gdbserver does not send a `reason:breakpoint` packet at all. Maybe lldb-server sends it? I am not sure
Also, I do not think lldb itself is adjusting the PC -- I think lldb-server does it, and that is also the reason why my PR did not need to alter the lldb behavior at all. lldb always expects the remote to have adjusted the PC if necessary, and it just uses whatever value that is reported
https://github.com/llvm/llvm-project/pull/102873
More information about the lldb-commits
mailing list