Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def parse_responses(self, register_values_cb=None):
try:
responses = self.gdbmi.get_gdb_response(timeout_sec=2)
except GdbTimeoutError:
print("ERROR: Got timeout from GDB. Exiting prematurely.")
self.done = True
return
for response in responses:
#print(response)
# Check for register values
payload = response['payload']
if payload is not None:
if 'register-values' in payload:
register_tuples = payload['register-values']
register_values = _parse_register_tuples(register_tuples)
register_values_cb(register_values)
# Check for end packet