[lldb-dev] Pending breakpoints to dlsym()ed functions

Dmitry Antipov via lldb-dev lldb-dev at lists.llvm.org
Wed Feb 14 23:39:34 PST 2018


I'm trying to setup a pending breakpoint for sin() and cos() which are dlsym()ed from libm.so
(sample attached), and an attempt to continue execution seems just hangs the debugger. For example:

(lldb) attach 17043
Process 17043 stopped
* thread #1, name = 't-dlopen', stop reason = signal SIGSTOP
     frame #0: 0x0000000000400728 t-dlopen`main(argc=1, argv=0x00007ffd2b0a00c8) at t-dlopen.c:21
    18  	  for (a = 0; a < DELAY + argc; a++)
    19  	    for (b = 0; b < DELAY + argc; b++)
    20  	      for (c = 0; c < DELAY + argc; c++)
-> 21  	        z += a + b + c;
    22  	  while (1)
    23  	    {
    24  	      void *handle = dlopen (LIBM_SO, RTLD_LAZY);

Executable module set to "/home/dantipov/tmp/t-dlopen".
Architecture set to: x86_64--linux.
(lldb) breakpoint set -n sin
Breakpoint 1: no locations (pending).
WARNING:  Unable to resolve breakpoint to any actual locations.
(lldb) breakpoint set -n cos
Breakpoint 2: no locations (pending).
WARNING:  Unable to resolve breakpoint to any actual locations.
(lldb) process continue                              ;; After this, nothing happens for a long time
Process 17043 resuming
(lldb) process status                                ;; After this, lldb hangs and have to be killed

I've tried 6.0.0-rc2 as well as 7.0.0 svn trunk 325127, with the same disappointing results.

Dmitry

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t-dlopen.c
Type: text/x-csrc
Size: 876 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20180215/513e051c/attachment.c>


More information about the lldb-dev mailing list