<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>All the test cases in TestDataFormatterStdUniquePtr were failing.<br>
My std::unique_ptr layout is:<br>
</p>
<p> (std::unique_ptr<int, std::default_delete<int> >) iup = {<br>
(std::__uniq_ptr_impl<int, std::default_delete<int> >) _M_t = {<br>
<font color="#ff0000"> (std::tuple<int *, std::default_delete<int> >) _M_t
</font>= {<br>
(std::_Tuple_impl<0, int *, std::default_delete<int> >) std::_Tuple_impl<0, int *, std::default_delete<int> > = {<br>
(std::_Head_base<0, int *, false>) std::_Head_base<0, int *, false> = {<br>
(int *) _M_head_impl = 0x0000000010041c20<br>
}<br>
}<br>
}<br>
}<br>
}<br>
<br>
It is showing "std::tuple<int *, std::default_delete<int> >) _M_t" <br>
instead of "std::_Tuple_impl<0, int *, std::default_delete<int> >".<br>
</p>
<br>
<div class="moz-cite-prefix">Em 27/02/2018 19:34, Greg Clayton escreveu:<br>
</div>
<blockquote type="cite" cite="mid:DE2F0BDC-A578-4295-88F5-209860AE1F6D@gmail.com">
<pre wrap="">Then the question becomes how can we identify the STL that is being used correctly so we can do the right thing. I worry that if std::unique_ptr isn't working that many many other STL things won't work as well. We are tuned for a specific STL
</pre>
<blockquote type="cite">
<pre wrap="">On Feb 27, 2018, at 2:12 PM, Pavel Labath via lldb-dev <a class="moz-txt-link-rfc2396E" href="mailto:lldb-dev@lists.llvm.org"><lldb-dev@lists.llvm.org></a> wrote:
This probably isn't arch-dependent. More likely you just have a
different version of libstdc++. Can you share how the std::unique_ptr
layout looks like for you. This is how my std::unique_ptr looks like
(from libstdc++.so.6.0.22):
(lldb) fr var X -R -T
(std::unique_ptr<int, std::default_delete<int> >) X = {
(std::unique_ptr<int, std::default_delete<int> >::__tuple_type) _M_t = {
(std::_Tuple_impl<0, int *, std::default_delete<int> >)
std::_Tuple_impl<0, int *, std::default_delete<int> > = {
(std::_Head_base<0, int *, false>) std::_Head_base<0, int *, false> = {
(int *) _M_head_impl = 0x0000555555768c20
}
}
}
}
On 27 February 2018 at 12:26, Alexandre Yukio Yamashita via lldb-dev
<a class="moz-txt-link-rfc2396E" href="mailto:lldb-dev@lists.llvm.org"><lldb-dev@lists.llvm.org></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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
<a class="moz-txt-link-abbreviated" href="http://www.eldorado.org.br">www.eldorado.org.br</a>
+55 19 3757 3201 / +55 19 9 8336 5553
_______________________________________________
lldb-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:lldb-dev@lists.llvm.org">lldb-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a>
</pre>
</blockquote>
<pre wrap="">_______________________________________________
lldb-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:lldb-dev@lists.llvm.org">lldb-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a>
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
Alexandre Yukio Yamashita (DSB) <br>
Instituto de Pesquisas Eldorado <br>
<a class="moz-txt-link-abbreviated" href="http://www.eldorado.org.br">www.eldorado.org.br</a><br>
+55 19 3757 3201 / +55 19 9 8336 5553 <br>
</div>
</body>
</html>