From: Nadav Har'El <n...@scylladb.com> Committer: Nadav Har'El <n...@scylladb.com> Branch: master
gcc 7: fix "osv info threads" 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> Message-Id: <20170713072704.20976-1-...@scylladb.com> --- diff --git a/scripts/loader.py b/scripts/loader.py --- 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']) -- 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.