@@ -32,17 +32,18 @@ class HammerParserBacktrace(gdb.Command):
maxsize=len(parserstack)
print("Argument must be a positive integer")
parser_name=top_level_parse.h_do_parse_parser.nameor"(Parser type resolution pending)"# TODO: should we just look at the vtable and name the parser in h_do_parse?
print("["+str(hex(top_level_parse.h_do_parse_parser.address))+"] "+parser_name+" [current]")#TODO: GUI widget should reflect this
print("")
depth=min(len(parserstack),maxsize)
ifdepth>0:# if stack not empty
# unsure what the idiomatic python is for handling negative indices starting with -1,
# but this addition is to avoid off-by-one errors
index=-(depth+1)
top=True
forpinparserstack[-1:index:-1]:
print("["+str(hex(p.address))+"] "+p.name)# TODO: errors in perform_lowlevel_parse, if p.name is None