How to use the pygdbmi.gdbcontroller.GdbTimeoutError function in pygdbmi

To help you get started, we’ve selected a few pygdbmi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rpp0 / emma / tools / simulation.py View on Github external
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

pygdbmi

Parse gdb machine interface output with Python

MIT
Latest version published 2 years ago

Package Health Score

58 / 100
Full package analysis

Similar packages