Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
lldb.debugger.HandleCommand('type category delete Qt')
return None
value = self.fromNativeValue(valobj)
# Expand variable if we need synthetic children
oldExpanded = self.expandedINames
self.expandedINames = [value.name] if expanded else []
savedOutput = self.output
self.output = ''
with TopLevelItem(self, value.name):
self.putItem(value)
# FIXME: Hook into putField, etc to build up object instead of parsing MI
response = gdbmiparser.parse_response("^ok,summary=%s" % self.output)
self.output = savedOutput
self.expandedINames = oldExpanded
summary = response["payload"]["summary"]
#print value, " --> ",
#pprint(summary)
return summary
def parse_response(response, line_num=0):
"""Parses the given GDB/MI output. Wraps gdbmiparser.parse_response
GDB_Engine.send_command returns an additional "^done" output because of the "source" command
This function is used to get rid of that output before parsing
Args:
response (str): GDB/MI response
line_num (int): Which line of the response will be parsed
Returns:
dict: Contents of the dict depends on the response
"""
return gdbmiparser.parse_response(response.splitlines()[line_num])