From 3cf7a70cebc4276f40f27251649414a9f9099ff4 Mon Sep 17 00:00:00 2001 From: Bilal Akhtar <bilal.akhtar@uwaterloo.ca> Date: Fri, 22 Jun 2018 20:19:30 -0400 Subject: [PATCH] Make output of info fibres more like info threads --- src/libfibre/libfibre.so-gdb.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/libfibre/libfibre.so-gdb.py b/src/libfibre/libfibre.so-gdb.py index 85b6b6f..91500c7 100644 --- a/src/libfibre/libfibre.so-gdb.py +++ b/src/libfibre/libfibre.so-gdb.py @@ -146,12 +146,17 @@ class InfoFibres(gdb.Command): def invoke(self, arg, from_tty): curr = gdb.parse_and_eval("Context::currStack") + print(" Idx \t Target Ptr \t Frame") for i in range(len(FibreSupport.list)): - print(str(i), "\tFibre", str(FibreSupport.list[i]), end='') if (FibreSupport.list[i] == curr): - print(" (*)", end='') + print("* ", end='') + else: + print(" ", end='') + print(str(i), "\tFibre", str(FibreSupport.list[i]), end='') with FibreSupport.get_frame(FibreSupport.list[i]) as frame: if frame is not None: + # Print instruction pointer + print("\t", str(gdb.parse_and_eval("$rip")).split(None, 1)[0], end='') print(" in ", frame.name(), sep='', end='') sal = frame.find_sal() if sal is not None and sal.symtab is not None: -- GitLab