[PATCH 6.10 360/482] scripts/gdb: add iteration function for rbtree