def METHOD_NAME(self, command, **kwargs):
    if self.elf_file is None:
        raise ValueError('Cannot debug; elf file is missing')
    command = (self.gdb +
               ['-ex', "set confirm off",
                '-ex', "target extended-remote {}".format(
                    self.gdb_serial)] +
                self.connect_rst_enable_arg +
               ['-ex', "monitor swdp_scan",
                '-ex', "attach 1",
                '-ex', "file {}".format(self.elf_file),
                '-ex', "load {}".format(self.elf_file)])
    self.check_call_ignore_sigint(command)