Upgrade to Pro — share decks privately, control downloads, hide ads and more …

boost::multi_index version >= 1.56.0 internal s...

boost::multi_index version >= 1.56.0 internal structure and iteration algorithm for gdb Boost-Prerry-Printer

I implemented boost::multi_index hashed index support for https://github.com/ruediger/Boost-Pretty-Printer/

This is boost::multi_index internal structure (iteration related elements only) and iteration algorithm.

Avatar for Takatoshi Kondo

Takatoshi Kondo

July 31, 2018
Tweet

More Decks by Takatoshi Kondo

Other Decks in Programming

Transcript

  1. prev_ next_ value - head_index_ptr_for_hash 1 boost::multi_index version >= 1.56.0

    internal structure focused on the element that is needed to iteration only
  2. prev_ next_ value - head_index_ptr_for_hash 1 2 2 2 prior_

    of the second from the left points to the right most element in the same value range next_ of the second from the right points to the left most element in the same value range
  3. prev_ next_ value - head_index_ptr_for_hash 1 2 2 2 2

    prior_ of the second from the left points to the right most element in the same value range next_ of the second from the right points to the left most element in the same value range
  4. prev_ next_ value - head_index_ptr_for_hash 1 2 2 2 2

    2 prior_ of the second from the left points to the right most element in the same value range next_ of the second from the right points to the left most element in the same value range
  5. prev_ next_ value - head_index_ptr_for_hash 1 3 2 2 2

    2 2 iteration algorithm crt end trace { A } A B C D E F G get_prev_ptr returns B B is NOT in trace, crt moves to B
  6. prev_ next_ value - head_index_ptr_for_hash 1 3 2 2 2

    2 2 iteration algorithm crt end trace { A, B } A B C D E F G get_prev_ptr returns C C is NOT in trace, crt moves to C
  7. prev_ next_ value - head_index_ptr_for_hash 1 3 2 2 2

    2 2 iteration algorithm crt end trace { A, B, C } A B C D E F G get_prev_ptr returns D D is NOT in trace, crt moves to D
  8. prev_ next_ value - head_index_ptr_for_hash 1 3 2 2 2

    2 2 iteration algorithm crt end trace { A, B, C, D } A B C D E F G get_prev_ptr returns E E is NOT in trace, crt moves to E
  9. prev_ next_ value - head_index_ptr_for_hash 1 3 2 2 2

    2 2 iteration algorithm crt end trace { A, B, C, D, E } A B C D E F G get_prev_ptr returns B B is in trace, crt moves to F by B's get_prev_ptr and C's get_next_ptr. Clear trace.
  10. prev_ next_ value - head_index_ptr_for_hash 1 3 2 2 2

    2 2 iteration algorithm crt end trace {} A B C D E F G get_prev_ptr returns B B is in trace, crt moves to F by B's get_prev_ptr and C's get_next_ptr. Clear trace.
  11. prev_ next_ value - head_index_ptr_for_hash 1 3 2 2 2

    2 2 iteration algorithm end trace { F } A B C D E F G crt get_prev_ptr returns G G is NOT in trace, crt moves to G
  12. prev_ next_ value - head_index_ptr_for_hash 1 3 2 2 2

    2 2 iteration algorithm end trace { F, G } A B C D E F G crt get_prev_ptr returns end. if crt equals to end, stop iteration.