bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Missing support for demangling lambdas with auto paramters in libbfd?


From: Ronny Brendel
Subject: Missing support for demangling lambdas with auto paramters in libbfd?
Date: Tue, 5 Jul 2016 11:01:29 +0200

Hi binutils-developers and -users,

#include <iostream>
using namespace std;
int main() {

    auto my_lambda = [](auto i) {
        cout << "asdf\n" << i;
    };

    auto my_lambda2 = [](int i) {
        cout << "asdf\n" << i;
    };

    my_lambda(1);
    my_lambda(2.0);
    my_lambda2(3);

    return 0;
}

$ g++ --std=c++14 file.cpp

In this example the mangled names for the lamdbas are:

_ZZ4mainENKUliE0_clEi               <- int
_ZZ4mainENKUlT_E_clIdEEDaS_  <- auto : double
_ZZ4mainENKUlT_E_clIiEEDaS_   <- auto : int

c++filt and libbfd are unable to demangle the last two: (binutils
version 2.26 on Kubuntu 16.04)

(lambdas with auto parameters is a c++14 feature)


Thanks for your help.
Best regards,
Ronny



reply via email to

[Prev in Thread] Current Thread [Next in Thread]