[lldb-dev] [Bug 33603] New: lldb unable to demangle lambdas in destructors

via lldb-dev lldb-dev at lists.llvm.org
Mon Jun 26 13:44:41 PDT 2017


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

            Bug ID: 33603
           Summary: lldb unable to demangle lambdas in destructors
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: dmaclach at gmail.com
                CC: llvm-bugs at lists.llvm.org

#include <exception>
#include <functional>

class Impl {
  public:
  template <typename F> void ImplTemplateFunc(F&& f)
  {
    return f();
  }

  ~Impl() {
    ImplTemplateFunc([] {
      printf("Hello");
    });
  }
};

int main() {
  Impl a;
  return 0;
}

Generates the mangled symbol __ZN4Impl16ImplTemplateFuncIZNS_D1EvEUlvE_EEvOT_
for the call to ImplTemplateFunc in ~Impl.

lldb is unable to demangle it

 * frame #0: 0x0000000100000e90
demangle`_ZN4Impl16ImplTemplateFuncIZNS_D1EvEUlvE_EEvOT_(this=0x00007fff5fbff658,
f=0x00007fff5fbff610) at main.cc:9
    frame #1: 0x0000000100000e59 demangle`Impl::~Impl(this=0x00007fff5fbff658)
at main.cc:13
    frame #2: 0x0000000100000e35 demangle`Impl::~Impl(this=0x00007fff5fbff658)
at main.cc:12
    frame #3: 0x0000000100000e0f demangle`main at main.cc:22
    frame #4: 0x00007fffb6742235 libdyld.dylib`start + 1
    frame #5: 0x00007fffb6742235 libdyld.dylib`start + 1

See also bug 33602.

-- 
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/20170626/17ecb1c0/attachment.html>


More information about the lldb-dev mailing list