gdb: use intrusive list for step-over chain
The threads that need a step-over are currently linked using an hand-written intrusive doubly-linked list, so that seems a very good candidate for intrusive_list, convert it. For this, we have a use case of appending a list to another one (in start_step_over). Based on the std::list and Boost APIs, add a splice method. However, only support splicing the other list at the end of the `this` list, since that's all we need. Add explicit default assignment operators to reference_to_pointer_iterator, which are otherwise implicitly deleted. This is needed because to define thread_step_over_list_safe_iterator, we wrap reference_to_pointer_iterator inside a basic_safe_iterator, and basic_safe_iterator needs to be able to copy-assign the wrapped iterator. The move-assignment operator is therefore not needed, only the copy-assignment operator is. But for completeness, add both. Change-Id: I31b2ff67c7b78251314646b31887ef1dfebe510c
This commit is contained in:
parent
08bdefb58b
commit
8b6a69b2f3
7 changed files with 177 additions and 138 deletions
|
@ -56,6 +56,9 @@ struct reference_to_pointer_iterator
|
|||
reference_to_pointer_iterator (const reference_to_pointer_iterator &) = default;
|
||||
reference_to_pointer_iterator (reference_to_pointer_iterator &&) = default;
|
||||
|
||||
reference_to_pointer_iterator &operator= (const reference_to_pointer_iterator &) = default;
|
||||
reference_to_pointer_iterator &operator= (reference_to_pointer_iterator &&) = default;
|
||||
|
||||
value_type operator* () const
|
||||
{ return &*m_it; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue