[lldb-dev] Issue: print std unique pointer

Alexandre Yukio Yamashita via lldb-dev lldb-dev at lists.llvm.org
Tue Feb 27 12:26:38 PST 2018


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


More information about the lldb-dev mailing list