Beispiel #1
0
    def __init__(self, *args):
        """Constructor."""
        debugger.Debugger.__init__(self, *args)
        self.pyclewn_cmds.update({
            'dbgvar': (),
            'delvar': (),
            'foldvar': (),
            'setfmtvar': (),
            'project': True,
            'sigint': (),
            'cwindow': (),
            'symcompletion': (),
            'define': (),
            'document': (),
            'commands': (),
        })
        if os.name != 'nt':
            self.pyclewn_cmds['inferiortty'] = ()
        self.vim_implementation.extend(
            ['cwindow', 'define', 'document', 'commands'])
        self.mapkeys.update(MAPKEYS)

        self.state = self.STATE_INIT
        self.pgm = self.options.pgm or 'gdb'
        self.arglist = self.options.args
        self.version = gdb_version(self.pgm)
        self.f_init = None
        ProcessChannel.__init__(self, self.vim_socket_map, self.getargv())

        self.info = gdbmi.Info(self)
        self.globaal = GlobalSetup(self.pgm, self.pyclewn_cmds,
                                   self.vim_implementation)
        self.cmds = self.globaal.cmds
        self.results = gdbmi.Result()
        self.oob_list = gdbmi.OobList(self)
        self.cli = gdbmi.CliCommand(self)
        self.gdb_busy = True
        self.oob = None
        self.stream_record = []
        self.lastcmd = ''
        self.doprompt = False
        self.token = ''
        self.curcmdline = ''
        self.firstcmdline = None
        self.time = None
        self.multiple_choice = 0
        self.cmd_fifo = collections.deque()
        self. async = False
        self.dereference = True
        self.project = ''
        self.foldlnum = None
        self.parse_paramlist(self.options.gdb)

        # schedule the first 'gdb_background_jobs' method
        self.timer(self.gdb_background_jobs, debugger.LOOP_TIMEOUT)
Beispiel #2
0
    def __init__(self, *args):
        """Constructor."""
        debugger.Debugger.__init__(self, *args)
        self.pyclewn_cmds.update(
            {
                'dbgvar':(),
                'delvar':(),
                'foldvar':(),
                'setfmtvar':(),
                'project':True,
                'sigint':(),
                'cwindow':(),
                'symcompletion':(),
            })
        self.mapkeys.update(MAPKEYS)

        self.state = self.STATE_INIT
        self.pgm = self.options.pgm or 'gdb'
        self.arglist = self.options.args
        self.version = gdb_version(self.pgm)
        self.f_init = None
        ProcessChannel.__init__(self, self.getargv())

        self.info = gdbmi.Info(self)
        self.globaal = GlobalSetup(self.pgm, self.pyclewn_cmds)
        self.cmds = self.globaal.cmds
        self.results = gdbmi.Result()
        self.oob_list = gdbmi.OobList(self)
        self.cli = gdbmi.CliCommand(self)
        self.gdb_busy = True
        self.oob = None
        self.stream_record = []
        self.lastcmd = ''
        self.doprompt = False
        self.token = ''
        self.curcmdline = ''
        self.firstcmdline = None
        self.time = None
        self.multiple_choice = 0
        self.cmd_fifo = collections.deque()
        self.async = False
        self.dereference = True
        self.project = ''
        self.foldlnum = None
        self.parse_paramlist(self.options.gdb)

        # schedule the first 'gdb_background_jobs' method
        self.timer(self.gdb_background_jobs, debugger.LOOP_TIMEOUT)
Beispiel #3
0
    def close(self):
        """Close gdb."""
        if self.state == self.STATE_RUNNING:
            self.cmd_quit()
            return

        if not self.closed:
            debugger.Debugger.close(self)
            ProcessChannel.close(self)

            # clear varobj
            rootvarobj = self.info.varobj
            cleared = rootvarobj.clear()
            self.update_dbgvarbuf(rootvarobj.collect, cleared)

            # remove temporary files
            del self.f_init
Beispiel #4
0
    def close(self):
        """Close gdb."""
        # This method may be called by the SIGCHLD handler and therefore must be
        # reentrant.
        if self.state == self.STATE_RUNNING:
            self.cmd_quit()
            return

        if self.state == self.STATE_CLOSING and not self.closed:
            debugger.Debugger.close(self)
            ProcessChannel.close(self)

            # clear varobj
            rootvarobj = self.info.varobj
            cleared = rootvarobj.clear()
            self.update_dbgvarbuf(rootvarobj.collect, cleared)

            # remove temporary files
            try:
                del self.f_init
            except AttributeError:
                pass
Beispiel #5
0
    def close(self):
        """Close gdb."""
        # This method may be called by the SIGCHLD handler and therefore must be
        # reentrant.
        if self.state == self.STATE_RUNNING:
            self.cmd_quit()
            return

        if self.state == self.STATE_CLOSING and not self.closed:
            debugger.Debugger.close(self)
            ProcessChannel.close(self)

            # clear varobj
            rootvarobj = self.info.varobj
            cleared = rootvarobj.clear()
            self.update_dbgvarbuf(rootvarobj.collect, cleared)

            # remove temporary files
            try:
                del self.f_init
            except AttributeError:
                pass
Beispiel #6
0
 def write(self, data):
     """Write data to gdb."""
     ProcessChannel.write(self, data)
     debug(data.rstrip('\n'))
Beispiel #7
0
 def _start(self):
     """Start gdb."""
     debugger.Debugger._start(self)
     ProcessChannel.start(self)
Beispiel #8
0
 def write(self, data):
     """Write data to gdb."""
     ProcessChannel.write(self, data)
     debug(data.rstrip('\n'))
Beispiel #9
0
 def _start(self):
     """Start gdb."""
     debugger.Debugger._start(self)
     ProcessChannel.start(self)
Beispiel #10
0
 def start(self):
     """Start gdb."""
     self.console_print('\n')
     ProcessChannel.start(self)
Beispiel #11
0
 def start(self):
     """Start gdb."""
     self.console_print('\n')
     ProcessChannel.start(self)