def init(self, gdbname, pyclewn_cmds, vim_implementation): """Singleton initialisation.""" self.gdbname = gdbname self.pyclewn_cmds = pyclewn_cmds self.vim_implementation = vim_implementation self.cmds = self._cmds = {} self.illegal_cmds_prefix = [] self.run_cmds_prefix = [] self.illegal_setargs_prefix = [] self.gdb_cmds() self._illegal_cmds_prefix = self.illegal_cmds_prefix self._run_cmds_prefix = self.run_cmds_prefix self._illegal_setargs_prefix = self.illegal_setargs_prefix self._f_bps = misc.tmpfile('gdb') self._f_ack = misc.tmpfile('gdb') self._f_clist = misc.tmpfile('gdb')
def inferiortty(self): """Spawn the inferior terminal.""" args = self.options.terminal.split(',') result_file = misc.tmpfile('dbg') args.extend(['inferior_tty.py', result_file.name]) info('inferiortty: %s' % args) try: subprocess.Popen(args) except OSError, e: self.console_print('Cannot spawn terminal: %s\n' % e) return
def cmd_inferiortty(self, *args): """Spawn gdb inferior terminal and setup gdb with this terminal.""" args = self.options.terminal.split(',') result_file = misc.tmpfile('gdb') args.extend(['inferior_tty.py', result_file.name]) info('inferiortty: %s', args) try: subprocess.Popen(args) except OSError, e: self.console_print('Cannot spawn terminal: %s\n' % e) self.prompt() return