コード例 #1
0
ファイル: app.py プロジェクト: cristivlas/zerobugs
    def __init__(self):
        view.Composite.__init__(self)

        #Schedule connecting the event pipe to event pump. The reason for
        # doing it this way rather than directly calling gobject.io_add_watch
        # is to let the UI paint itself before starting a (possibly) lengthy
        # debugger operation. (The PythonGate plugin blocks the main thread
        # until zero.event_pipe() is called).
        gobject.idle_add(self.__connect_event_pipe)

        self.__corefile = None
        self.__debugger = zero.debugger()
        self.__process = None
        self.__thread = None
        self.__widgets = gtk.glade.XML(gladefile)
        self.__window = self.__widgets.get_widget("main")
        self.__window.connect("destroy", self.__on_destroy)

        #The listings view shows C++ code and assembly code
        self.__listings = view.Listings(self.__widgets.get_widget("listings"))
        self.__init_bottom_book()
        self.__init_right_book()
        self.add(self.__listings)
        self.__init_menu()
        self.__init_toolbar(self.__widgets.get_widget("toolbar"))
        self.__init_font_button()
コード例 #2
0
ファイル: app.py プロジェクト: Panke/zerobugs
	def __init__(self):
		view.Composite.__init__(self)

		#Schedule connecting the event pipe to event pump. The reason for
		# doing it this way rather than directly calling gobject.io_add_watch
		# is to let the UI paint itself before starting a (possibly) lengthy
		# debugger operation. (The PythonGate plugin blocks the main thread 
		# until zero.event_pipe() is called).
		gobject.idle_add(self.__connect_event_pipe)

		self.__corefile = None
		self.__debugger = zero.debugger()
		self.__process = None
		self.__thread = None
		self.__widgets = gtk.glade.XML(gladefile)
		self.__window = self.__widgets.get_widget("main")
		self.__window.connect("destroy", self.__on_destroy)

		#The listings view shows C++ code and assembly code
		self.__listings = view.Listings(self.__widgets.get_widget("listings"))
		self.__init_bottom_book()
		self.__init_right_book()
		self.add(self.__listings)
		self.__init_menu()
		self.__init_toolbar(self.__widgets.get_widget("toolbar"))
		self.__init_font_button()
コード例 #3
0
ファイル: dtestunit.py プロジェクト: cristivlas/zerobugs
def on_table_done(symTable):
    """ 
	Calback function automatically invoked
	by the debugger each time a new symbol table
	is loaded into memory
	"""
    if symTable.is_dynamic():
        return
    #print symTable.filename()
    tests = []
    extension = re.compile('.d$')

    process = symTable.process()

    for unit in symTable.module().translation_units():
        #print unit.filename(),unit.language()

        if unit.language() == zero.TranslationUnit.Language.D:
            name = os.path.basename(unit.filename())
            #i = 0
            i = 1
            while True:
                #As of now, the D demangler does not support any flags,
                # and we cannot instruct it to omit result types and
                # param lists from the mangled name.
                #symName = "void " + extension.sub('.__unittest%d()' % i, name)
                symName = "void " + unit.module() + ('.__unittest%d()' % i)
                print symName
                matches = symTable.lookup(symName)
                if not len(matches):
                    break
                #print symName
                tests.append(symName)
                for sym in matches:
                    process.set_breakpoint(sym.addr())
                i += 1

    if len(tests):
        zero.debugger().message('Detected: \n' + ',\n'.join(tests),
                                zero.Message.Info)
コード例 #4
0
ファイル: dtestunit.py プロジェクト: Panke/zerobugs
def on_table_done(symTable):
	""" 
	Calback function automatically invoked
	by the debugger each time a new symbol table
	is loaded into memory
	"""
	if symTable.is_dynamic():
		return
	#print symTable.filename()
	tests = []
	extension = re.compile('.d$')

	process = symTable.process()

	for unit in symTable.module().translation_units():
		#print unit.filename(),unit.language()

		if unit.language() == zero.TranslationUnit.Language.D:
			name = os.path.basename(unit.filename())
			#i = 0
			i = 1
			while True:
				#As of now, the D demangler does not support any flags,
				# and we cannot instruct it to omit result types and 
				# param lists from the mangled name.
				#symName = "void " + extension.sub('.__unittest%d()' % i, name)
				symName = "void " + unit.module() + ('.__unittest%d()' % i)
				print symName
				matches = symTable.lookup(symName)	
				if not len(matches):
					break
				#print symName
				tests.append(symName)
				for sym in matches:
					process.set_breakpoint(sym.addr())
				i += 1

	if len(tests):
		zero.debugger().message(
			'Detected: \n' + ',\n'.join(tests), zero.Message.Info)
コード例 #5
0
ファイル: macro.py プロジェクト: cristivlas/zerobugs
def step(count=1):
    thread = zero.debugger().current_thread()
    thread.step(zero.Step.OverStatement, count)
コード例 #6
0
ファイル: macro.py プロジェクト: cristivlas/zerobugs
def msg(txt):
    zero.debugger().message(txt, zero.Message.Info)
コード例 #7
0
ファイル: source.py プロジェクト: cristivlas/zerobugs
	def get_addresses(self, iter):
		lineNum = int(self._Code__model.get_value(iter, 1))
		#convert line number to addresses:
		addrs = zero.debugger().line_to_addr(self.filename(), lineNum)
		return addrs
コード例 #8
0
ファイル: macro.py プロジェクト: Panke/zerobugs
def msg(txt):
	zero.debugger().message(txt, zero.Message.Info)
コード例 #9
0
ファイル: macro.py プロジェクト: Panke/zerobugs
def step(count = 1):
	thread = zero.debugger().current_thread()
	thread.step(zero.Step.OverStatement, count)