<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/124761>124761</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
lldb doesn't stop at a pending breakpoint in a shared library that is loaded with dlopen, the issue depends on the working directory of the program and the relative path of the shared library
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
levy
</td>
</tr>
</table>
<pre>
I'm using lldb 18.1.3 on Ubuntu Linux.
The attached ZIP file contains a C++ program and a shared library. The program simply changes to the given working directory (first command line argument), loads the library from the given path (second command line argument), and calls a function in the library.
There are two shell scripts to run the program, both runs as expected (stdout). The scripts are located at different directories and they use different relative paths. There are also two scripts that run lldb, both use the same lldb command file to set a breakpoint before the program is run.
One of the scripts works as expected, the other does not. I think this is a bug, in both cases the debugger is expected to stop at the breakpoint.
[bug.zip](https://github.com/user-attachments/files/18575103/bug.zip)
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8lMGOozgQhp_GXEqNwIRAHzh0zyhSSyvtHnYvezO4AG8bG9nl9GSfflSQpNMaaS6xYsqf__qrXCpGMznETtSvov6eqUSzD53F8yXrvb50b0I2C6Ro3ATW6h7KNi_zCryDf_rkKMEfxqUfuSheRPHy94ygiNQwo4Z_3_6C0ViEwTtSxkVQ8E3IVyFfYQ1-CmoB5TQoiLMKqMGaPqhwyYExt4holtVeYJiVmzACeaAZYTJndPDhwzsL0ybgQD5cQMh2NCESDH5ZGG6NQ1BhSgs6EvJZyG9gvdJxw1xvhDH45YG7KpoZFXHwTv-WxfuDspaTG5MbyHgHxj3SP70JfByBPjzEGa2FOASz0pZVSPuha97M7j3NvB9BRcAfKw6EetNF2idWsFt1ozDb-kFxlCLQZhwxoKO7PwbjJphmvECK-BAS0CoyZ9xyjxv3qlbZ6HfJN7Gzok0u98NdJ-NYf1QL7p1ys23rAfIQkUBBH1C9r944gh5HH_AxazCRyVfH_nQIftyp17u54l_s4Ps5wNOMAbTHCM5TDm9As3Hv_BuZqqBPEwcbt-sdVMS9CTT2aZowcNjdZdZLfmUfOeZT9VWbqF_7NOX_m1XU34VsZ6I1iupFyJOQp8nQnPp88IuQpxQxPO2vghsnCnliS3gt27qpy6IS8nSjyedMd5V-rp5Vhl3ZVG3R1G0ls7mTx_q5OPZtoxsty6MaVN02RXNQZXOs27LNTCcLWRelbMtDXVQyr479WJYDjrpqykYfxKHARRmbW3tech-mzMSYsCvloTmWmVU92rjNAikdfsD2VUjJoyF0fOipT1MUh8KaSPETQ4YsdlvZuQZOyIbuBipY0Wl-qA_FN-6Xh793lonbA0UNH4Zm0Nav6G5l3gSBRgZGHkK8-esYuHbN45Th_1-a_N5aXzRkKdjuN8XkjK_L0xr8fziQkKdN1lbQ3chzJ38GAAD__2-r1hY">