[Lldb-commits] [PATCH] D114008: Draft PR for the deque, stack, queue lldb data formatters
walter erquinigo via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Nov 17 08:26:23 PST 2021
wallace requested changes to this revision.
wallace added a comment.
This revision now requires changes to proceed.
discussed offline how to traverse each individual subarray. This might make it impossible to reuse it for queue and stack
================
Comment at: lldb/examples/synthetic/gnu_libstdcpp.py:13
+ def __init__(self, valobj, dict):
+ print("Init called")
+ self.valobj = valobj
----------------
remove
================
Comment at: lldb/examples/synthetic/gnu_libstdcpp.py:22
+ try:
+ print("Update called")
+ self.impl = self.valobj.GetChildMemberWithName('_M_impl')
----------------
remove
================
Comment at: lldb/examples/synthetic/gnu_libstdcpp.py:31
+ except:
+ pass
+
----------------
don't forget to always return False
================
Comment at: lldb/examples/synthetic/gnu_libstdcpp.py:60
+
+ def num_children_impl(self):
+ # logger = lldb.formatters.Logger.Logger()
----------------
danilashtefan wrote:
> 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 }
>
>
discussed offline how to handle this
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