jankratochvil added a comment.

In D63868#1560872 <https://reviews.llvm.org/D63868#1560872>, @aadsm wrote:

> I don't think we can stop loading/unloading the libraries in 
> `ProcessGDBRemote::LoadModules`. The windows dynamic loader relies on this


Then it could be Windows-specific.

> and the `library` entry on the stop packet does as well: 
> https://github.com/llvm-mirror/lldb/blob/9689521b477c75b52257fba9655cabefc3db676c/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp#L2374-L2375

When is this `library` entry being used?

For implementing fast shared libraries introspection one should implement what 
glibc+gdb have - STAP (SystemTap) probes 
<https://sourceware.org/git/?p=glibc.git;a=blob;f=elf/rtld-debugger-interface.txt>:
 Those are few breakpoints each directly reporting the one added/removed 
library as one can see from GDB:

  (gdb) maintenance info breakpoints
  (gdb) info probes
  Num     Type                  Disp Enb Address            What
  Type Provider   Name                   Where              Semaphore Object   
  -2      shlib events          keep y   0x00007ffff7fd67a5 <dl_main+8517> inf 1
  stap rtld       init_complete          0x00007ffff7fd67a5           
/lib64/ld-linux-x86-64.so.2
  -5      shlib events          keep y   0x00007ffff7fe61a0 
<dl_open_worker+1488> inf 1
  stap rtld       reloc_complete         0x00007ffff7fe61a0           
/lib64/ld-linux-x86-64.so.2
  -7      shlib events          keep y   0x00007ffff7fe715e 
<_dl_close_worker+3070> inf 1
  stap rtld       unmap_complete         0x00007ffff7fe715e           
/lib64/ld-linux-x86-64.so.2


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63868/new/

https://reviews.llvm.org/D63868



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to