The internal structure of std::unique_ptr changed, and we need it to support the "osv info threads" gdb command. With this patch both old and new layouts will be supported.
Signed-off-by: Nadav Har'El <n...@scylladb.com> --- scripts/loader.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/loader.py b/scripts/loader.py index 89481645..44b84c57 100644 --- a/scripts/loader.py +++ b/scripts/loader.py @@ -942,7 +942,11 @@ def find_or_give_last(predicate, seq): return last def unique_ptr_get(u): - return u['_M_t']['_M_head_impl'] + try: + # Since gcc 7 + return u['_M_t']['_M_t']['_M_head_impl'] + except: + return u['_M_t']['_M_head_impl'] def thread_cpu(t): d = unique_ptr_get(t['_detached_state']) -- 2.13.0 -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.