[lldb-dev] Issue: print std unique pointer

Greg Clayton via lldb-dev lldb-dev at lists.llvm.org
Tue Feb 27 13:25:19 PST 2018


It depends on the version of the C++ standard library you are using. Is this the only thing that isn't working in the STL data formatters? I would expect the STL library to be the same on PowerPC as it is on other platforms so I wouldn't guess this would be an issue that is arch dependent.

Greg Clayton


> On Feb 27, 2018, at 12:26 PM, Alexandre Yukio Yamashita via lldb-dev <lldb-dev at lists.llvm.org> wrote:
> 
> Hi,
> 
> LLDB is printing a empty value for unique pointers in PowerPC.
> And I am investigating a solution for this problem.
> 
> The problem occurs because the ptr_obj variable has a empty value in 
> Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp:73.
> 
> I could solve it, changing this line 
> Plugins/Language/CPlusPlus/LibStdcppTuple.cpp:68
> from:
>     if (name_str.startswith("std::_Tuple_impl<")) {
> to:
>     if (name_str.startswith("std::_Tuple_impl<") || 
> name_str.startswith("_M_t") ) {
> 
> After this change, the test TestDataFormatterStdUniquePtr pass with success.
> And the unique pointers are displayed correctly.
> 
> Is there a better solution for that?
> 
> Thanks.
> Alexandre.
> 
> 
> -- 
> Alexandre Yukio Yamashita (DSB)
> Instituto de Pesquisas Eldorado
> www.eldorado.org.br
> +55 19 3757 3201 / +55 19 9 8336 5553
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev



More information about the lldb-dev mailing list