Skip to content
Snippets Groups Projects
Commit 3cf7a70c authored by Mohammed Bilal Akhtar's avatar Mohammed Bilal Akhtar
Browse files

Make output of info fibres more like info threads

parent b8d2411d
No related branches found
No related tags found
1 merge request!3Add column header for info fibres, and add tabs between fields
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment