def init(self): gdb = GDBProtocol(gdb_executable=self.gdb_executable, arch=self._arch, additional_args=self.gdb_additional_args, avatar_queue=self.avatar.queue, origin=self) if not self._serial: if gdb.remote_connect(port=self.gdb_port): self.log.info("Connected to Target") else: self.log.warning("Connecting failed") else: if gdb.remote_connect_serial(device=self.gdb_serial_device, baud_rate=self.gdb_serial_baud_rate, parity=self.gdb_serial_parity): self.log.info("Connected to Target") else: self.log.warning("Connecting failed") self._exec_protocol = gdb self._memory_protocol = gdb self._register_protocol = gdb self._signal_protocol = gdb self._monitor_protocol = None self.wait()
def init(self): gdb = GDBProtocol(gdb_executable=self.gdb_executable, arch=self._arch, additional_args=self.gdb_additional_args, avatar=self.avatar, origin=self, enable_init_files=self._enable_init_files, binary=self._local_binary, local_arguments=self._arguments, verbose=self._verbose_gdbmi) # If we are debugging a program locally, # we do not need to establish any connections if not self._local_binary: if self.gdb_unix_socket_path is not None: if gdb.remote_connect_unix(self.gdb_unix_socket_path): self.log.info("Connected to Target") else: self.log.warning("Connecting failed") elif not self._serial: if gdb.remote_connect(ip=self.gdb_ip, port=self.gdb_port): self.log.info("Connected to Target") else: self.log.warning("Connecting failed") else: if gdb.remote_connect_serial( device=self.gdb_serial_device, baud_rate=self.gdb_serial_baud_rate, parity=self.gdb_serial_parity): self.log.info("Connected to Target") else: self.log.warning("Connecting failed") else: self.update_state(TargetStates.INITIALIZED) self.protocols.set_all(gdb) if self._local_binary: self.wait(state=TargetStates.INITIALIZED) else: self.wait()
def init(self): gdb = GDBProtocol(gdb_executable=self.gdb_executable, arch=self._arch, additional_args=self.gdb_additional_args, avatar=self.avatar, origin=self) if not self._serial: if gdb.remote_connect(ip=self.gdb_ip, port=self.gdb_port): self.log.info("Connected to Target") else: self.log.warning("Connecting failed") else: if gdb.remote_connect_serial(device=self.gdb_serial_device, baud_rate=self.gdb_serial_baud_rate, parity=self.gdb_serial_parity): self.log.info("Connected to Target") else: self.log.warning("Connecting failed") self.protocols.set_all(gdb) self.wait()