[Lldb-commits] [PATCH] D114008: Draft PR for the deque, stack, queue lldb data formatters

Danil Stefaniuc via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 16 09:24:10 PST 2021


danilashtefan added inline comments.


================
Comment at: lldb/examples/synthetic/gnu_libstdcpp.py:60
+    
+    def num_children_impl(self):
+        # logger = lldb.formatters.Logger.Logger()
----------------
This method does not currently work. I simply tried to calculate the size from start and finish pointers. When it did not, I investigated further and this was my founding:

This is when we get the iterator value this comes out:

`_Deque_iterator(const _Deque_iterator& __x) noexcept
   169 	       : _M_cur(__x._M_cur), _M_first(__x._M_first),
   170 		 _M_last(__x._M_last), _M_node(__x._M_node) { }`

And when it++ is done this is what happens behind:

operator++()
   189       {
   190    ++_M_cur;
   191    if (_M_cur == _M_last)
   192      {
   193        _M_set_node(_M_node + 1);
   194        _M_cur = _M_first;
   195      }
   196    return *this;
   197        }




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114008/new/

https://reviews.llvm.org/D114008



More information about the lldb-commits mailing list