<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/56125>56125</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            LLDB: GDB remote protocol feature/packet `swbreak` not supported 
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ByteNacked
      </td>
    </tr>
</table>

<pre>
    Hello,
When I was trying to use latest `lldb` with `gdbserver`, I came across an issue of not supported feature/packet `swbreak` in GDB remote protocol. 
As far as I understand, without this feature, software breakpoints do not work correctly then using with `gdbserver`.

On `swbreak` in [gdb manual](https://sourceware.org/gdb/onlinedocs/gdb/Stop-Reply-Packets.html#swbreak-stop-reason):

_On some architectures, such as x86, at the architecture level, when a breakpoint instruction executes the program counter points at the breakpoint address plus an offset. On such targets, the stub is responsible for adjusting the PC to point back at the breakpoint address._

And this is exactly that (not) happens then I trying to use software breakpoints in this setup,
PC register does not adjusted and program crashes.

Is that intendent behaviour?
Will patches adding this feature be accepted?



Ubuntu 20.04.4 LTS x86_64
llvb version : latest master/main
gdbserver version : GNU gdbserver (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2



</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyFVNtu2zgQ_Rr5ZWBBoS-1HvSQS9sNEHSL7Rb7GFDkSGJDkwKHjOO_36HkxvGmiwKCRIrknDOHZ6b1-tj8gdb6QtwW1V1RXf8zoIN7OEiCGI7G9RA9JEKwMiJFKLaVtbrlDxxMHPK81y1heMbAY47Dp5XcI0gVPBFIB4YoIfgOnI9AaRx9iKihQxlTwEJ8GqV6wik2HdqA8imHNw4-391AwL2PCGPw0StvS5h5XhN0MgDTvIfkNAaK0ukMn2n5FCEOhs4Yt0C-iwcZECaE0RsXCbSfSB18eALlQ0AV7ZGPsgiJcva_SrKcKczvP9173sX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