Skip to content
Snippets Groups Projects
Commit 4f19df03 authored by Martin Karsten's avatar Martin Karsten
Browse files

Merge branch 'minor-column-change' into 'master'

Add column header for info fibres, and add tabs between fields

See merge request !3
parents bd8dc8b1 3cf7a70c
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): ...@@ -146,12 +146,17 @@ class InfoFibres(gdb.Command):
def invoke(self, arg, from_tty): def invoke(self, arg, from_tty):
curr = gdb.parse_and_eval("Context::currStack") curr = gdb.parse_and_eval("Context::currStack")
print(" Idx \t Target Ptr \t Frame")
for i in range(len(FibreSupport.list)): for i in range(len(FibreSupport.list)):
print(str(i), "\tFibre", str(FibreSupport.list[i]), end='')
if (FibreSupport.list[i] == curr): 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: with FibreSupport.get_frame(FibreSupport.list[i]) as frame:
if frame is not None: 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='') print(" in ", frame.name(), sep='', end='')
sal = frame.find_sal() sal = frame.find_sal()
if sal is not None and sal.symtab is not None: 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