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

    <tr>
        <th>Summary</th>
        <td>
            Cannot load library into target modules for System.Runtime.loadlibrary() in Android
        </td>
    </tr>

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

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

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

<pre>
    1. libraries in base.apk loaded by System.Runtime.loadlibrary cannot be loaded into target modules when attaching to the process.
2. libraries not loaded into target modules at the attaching time will not be loaded after using System.Runtime.loadlibrary().

Were lldb-server and lldb designed to be like this? Are there some ways to fix these problems for now?
Currently, I push library into the /data/app/hash/app-name-hash/lib/arm64 and make jdb stop at the "static System.Runtime.loadlibrary". Then step over it. At last, lldb was attached to the remote process. This makes all things fine for me now but it was too complicated. I want to debug an android JNI library and a vendor library.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyFk1FvmzAQxz8NvFhBBAghDzxkrSp1D3vYJu35jI_g1tjIPprm2-8MydpOWidFgO27v3_3v4t06tJuM2G09OA1BqGtkBAwg-lZGAcKlZAX8eMSCMfs-2xJj5jFgzXlIjqw1pGQeAvXlpwg8CckMTo1G1Y9D2gFEEE3aHsSMWBAMXnXYQhZkt8n-bF4jxElP9EDWgTeKTKWOGtjxEcY6Am9mEOM-XcRSdEkxeHKsT5_oWcRo-QmoH9hDbBqWQuFQZ8sazNWvEg_I8PokJQP4ujjd0wNLgLBJcSwXr_G7bCULA2OQfTOM-qZk9b77mbv0ZJhljvxKKY5DOJm8eoA15sUDwoI-AXTxM8BwrAuNhZG3FzXnBd3_VhXC_YIjPjE6IHcdPMuKYpAQLr71Bduys_YO46YhIs-aMrEkZsDgSLqYskZwrUXqy1R3-Po6K3HLKPDQsKh3CaKbWMbtMXFC3aL7RByJr5hESTnROfGyegOCFXGrpzBUtRXKOcTlxar804r8fXb4x-3YsUgXtAqlr1uZim223p3KKtyX5Spakt1KA-QkiaD7d06wrHwvzz_OHWR839DFP9Ax5Uqnb1pB6KJR-PIDeHfSdMwy4zLim0yL7fXhm16wo4dfdAhzBj4Y1c3VZMOrcz30O-lKjvZQ53vGzgcZI31IW_6rmya1IBEE9pk9yXZ3ae6LfKiyJt8m3N-VWR9WTeF2mJX1eW-kzKpchxBmyxenDl_Sn27MLCngQ-NDhTeDiEs4443fZhpcL4dLq95lTfpgtsurL8Bl3x69g">