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

    <tr>
        <th>Summary</th>
        <td>
            lldb fails to hit breakpoint in static binary not linked to standard libraries
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            lldb
      </td>
    </tr>

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

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

<pre>
    If we take the following assembly file `test.S`:
```asm
.text
.globl _start
_start:
  movq $60, %rax
  movq $0, %rdi
 syscall
end:
```
and compile it using the following `clang` invocation:
```bash
clang test.S -static --no-standard-libraries -o test
```
And then the standard `lldb` invocation:
```bash
lldb ./test
```
If we run the following commands in the `lldb` terminal:
```
b _start
run
```
`lldb` gives the following output:
```
Process 1258989 launched: '/test2' (x86_64)
Process 1258989 exited with status = 0 (0x00000000)
```
Instead of hitting the expected breakpoint. Verified that this behavior is occurring with ToT. Running this example with `gdb` produces the expected behavior.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMVF2PqzgM_TXhxSoKKVD6wMPsjirt22r3al-vEnDBOyHpJqbT-ferAPNxe2ekW1XCxPbx8bGDjpEGh9iK6jdRPWZ65tGH1ng_aaepR1dUZWZ8_9L-cYZnBNZPCDwinL21_pncADpGnIx9gTNZBFFLxsj536KWYv8g5KOQD8le_jpO60nOeOPNHKw3Fr5H1mE72uzXdIDJX_8DocpaCvU7CFUFfbv3vbl62lzxJXba2vUNXf8zn_VVux46P10Sf2KYY2rrxyZFLTur3SBqCeSuvtNM3v0MaHQc16MlHFYtYBdZM3Ww2zmfbNfr0O8smaADYYSdXyI_Zffg-kTGLYxecxMha3vz63xSNORCnb4stE44zO6u985Pk3Z9BFo9H0ozhomctl8pa34Ya5jdp1EfAAe6Yryr72e-zPxViT-D7zBGKFTVHJsjWD27bsQ0bBDqsDWshDqAUM2tqb_XpVDHz5PxRow9PBOPSWqeI4j9I8iUKm9y-72l3wvoIqPuwZ9hJObXLcLbBbsEawLqp4snxzn8g4HOhGm0moFHimBw1FfyASiC77o5hISwcPnmv-Xw1-zcikkR8Kani8XVLWo5rPpdgu_nbpPwvfCGnGd9u--P-6POsC3qRhVV0RxkNraF7LQ0x1KrsjBYHYzao6yOsm8K1RwKk1GrpNrLUinZqHIvc1kVjakOslONVKaoRClx0mRza69T7sOQUYwztrVSxyqz2qCNy2dGqWXYSqUPTmhT-M7MQxSltBQ5vgMwscV2WdyzJhuBfRL2g45pJberZcjp8ALOM1hyT0lZ_35d3q5aNgfbjsyXmBZKnYQ6DcTjbPLOT0KdUvHtsbsE_y92LNRpaSUKdVq6-T8AAP__d5qYQA">