[lldb-dev] [Bug 36394] New: Unable to resolve pending breakpoint to an indirect (STT_GNU_IFUNC) function

via lldb-dev lldb-dev at lists.llvm.org
Thu Feb 15 05:27:41 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=36394

            Bug ID: 36394
           Summary: Unable to resolve pending breakpoint to an indirect
                    (STT_GNU_IFUNC) function
           Product: lldb
           Version: 6.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: dantipov at nvidia.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 19868
  --> https://bugs.llvm.org/attachment.cgi?id=19868&action=edit
Test program

While trying to setup a pending breakpoint for sin() and cos() which are
dlsym()ed from libm.so, an attempt to continue execution seems just hangs the
debugger:

(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

Note that sin() and cos() are not the regular functions but an indirect
function stubs, see https://sourceware.org/glibc/wiki/GNU_IFUNC.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20180215/fc87ed11/attachment.html>


More information about the lldb-dev mailing list