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

    <tr>
        <th>Summary</th>
        <td>
            lldb skips the breakpoint on main function
        </td>
    </tr>

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

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

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

<pre>
    When I try to set a breakpoint in the main function and run, the program runs directly to the end.

``` c
(lldb) target create "./random_41"
Current executable set to '/home/hzw/experiment/csmith_prog/clang_O1/random_41' (x86_64).
(lldb) b main
Breakpoint 1: where = random_41`main + 32 [inlined] func_1 + 32 at random_41.c:318:23, address = 0x0000000000001170
(lldb) r
Process 142282 launched: '/home/hzw/experiment/csmith_prog/clang_O1/random_41' (x86_64)
checksum = 0
Process 142282 exited with status = 0 (0x00000000)
```

When breaking on func_1, the program stops normally.Using gdb I get the same result.like this:
``` c 
(lldb) target create "./random_41"
Current executable set to '/home/hzw/experiment/csmith_prog/clang_O1/random_41' (x86_64).
(lldb) b func_1 
Breakpoint 1: where = random_41`main [inlined] func_1 at random_41.c:3392, address = 0x0000000000001150
(lldb) r
Process 142372 launched: '/home/hzw/experiment/csmith_prog/clang_O1/random_41' (x86_64)
Process 142372 stopped
* thread #1, name = 'random_41', stop reason = breakpoint 1.1
    frame #0: 0x0000555555555150 random_41`main [inlined] func_1 at random_41.c:3392
   3389 
   3390 /* ---------------------------------------- */
   3391 int main (int argc, char* argv[])
-> 3392      {
   3393     int i, j, k;
   3394     int print_hash_value = 0;
```
debug_info might help.Maybe it's because of the same DW_AT_low_pc.
```
0x000027e3:   DW_TAG_subprogram
 DW_AT_low_pc    (0x0000000000002130)
                DW_AT_high_pc (0x0000000000002d0a)
                DW_AT_frame_base        (DW_OP_reg7 RSP)
                DW_AT_call_all_calls    (true)
 DW_AT_name      ("main")
                DW_AT_decl_file ("/home/hzw/experiment/csmith_prog/mutated_progs/random_41.c")
 DW_AT_decl_line (3391)
                DW_AT_prototyped (true)
                DW_AT_type      (0x000000fa "int")
 DW_AT_external  (true)
```
```
0x00002833: DW_TAG_inlined_subroutine
                  DW_AT_abstract_origin (0x000007d1 "func_1")
                  DW_AT_low_pc (0x0000000000002130)
                  DW_AT_high_pc (0x00000000000028cf)
                  DW_AT_call_file ("/home/hzw/experiment/csmith_prog/mutated_progs/random_41.c")
 DW_AT_call_line       (3397)
                  DW_AT_call_column (0x05)
```
compile:
clang  random_41.i func_decl.c -O1 -o random_41 -g -w 

clang version:15.0.7
lldb:15.0.7

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzUV99v2zYQ_mvol4MFibQs6cEPTrNsfRhSrF37KFDSWWJDkQJJ5cf--oGUHMtxurTYUGBCYlsk77vvjh_vJG6taBXijqRXJL1e8dF12uze336-_fzbx1Wlm6fdlw4VvAdnnsBpsOiAQ2WQ3w1aKAdCgesQei4UHEZVO6EVcNWAGRWh78LkYHRreO-HLDTCYO1kQPOTqJqIxNck3s-f23j6g3oeoLmUTUVoAY6bFh3UBrlDIJRGhN4Yrhrdl5uEUDpZvBuNQeUAH7EeHa8kBt5OA6EZoTed7tF__fVA6A0-DmhEj8oRelPbXriu9IT9neSqLW-TcycZEJo_5ttyuyG0iC5IViEZ0_DVKVEJYXt46NAgEHYNJ8BtHJJH6BUwCiS9EkoKhQ1Jr0NGy-Q4x93JLKoJ27MkJ2xPmU80bxqD1gbw-DFeXEmSxRcszTTywejaWyUbSnMKko-q7rDxXP_7XE0u6w7rOzv2E9NXaeCjcNjAg3AdWMfdOIfl0U6xPSM-S2apo6DbIFShWtBqzuVLTVqnBwtKm55L-RT9af3qtqngPXip-aWW9wgG7ShdJMUdguuEJexSr_B_FexRZj-s2dfEeqlSVtC3FJp-j0JZ9nMU-sKll8iAzZHgHlxnkDdAKAtyUl4fPihCsyWyn_O2YJBbrcKSReVMomSCBAA4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