Exemple #1
0
    def __init__(self, db, gui):
        self.db = db
        self.gui = gui
        self.trace = vdb.VdbTrace(db)

        canvas = VdbHeapView(self.trace, syms=self.trace)
        canvas.addRenderer("Windows Heap", VdbHeapRenderer(self.trace))
        vw_memview.MemoryWindow.__init__(self, canvas)
Exemple #2
0
    def __init__(self, db, gui):
        self.db = db
        self.gui = gui
        trace = vdb.VdbTrace(db)
        canvas = VdbMemoryView(trace, self)
        for rname in db.canvas.getRendererNames():
            canvas.addRenderer(rname, db.canvas.getRenderer(rname))

        vw_memview.MemoryWindow.__init__(self, canvas)
Exemple #3
0
    def __init__(self, db, gui):
        VdbWindow.__init__(self, db, gui)
        self.set_title("Registers")
        trace = vdb.VdbTrace(db)
        self.regview = vw_views.VTextView()
        self.regview.textview.set_editable(False)
        arch = trace.getMeta("Architecture")
        self.reglist = db.config.get("RegisterView", arch).split(",")
        self.add(self.regview)

        self.regs = {}
        self.lastthread = -1
Exemple #4
0
    def __init__(self, db, parent=None):
        t = vdb.VdbTrace(db)
        e_mem_qt.VQMemoryWindow.__init__(self, t, syms=t, parent=parent)
        vtrace.Notifier.__init__(self)
        self._db = db
        self._db.registerNotifier(vtrace.NOTIFY_ALL, self)
        for rname in db.canvas.getRendererNames():
            self.mem_canvas.addRenderer(rname, db.canvas.getRenderer(rname))

        self.loadRendSelect()

        if not t.isAttached():
            self.setEnabled(False)
        elif t.isRunning():
            self.setEnabled(False)
        else:
            self._renderMemory()
    def __init__(self, trace=None):
        v_notif.Notifier.__init__(self)
        v_util.TraceManager.__init__(self)

        if trace == None:
            trace = vtrace.getTrace()

        arch = trace.getMeta("Architecture")
        self.arch = envi.getArchModule(arch)
        self.difftracks = {}

        # We hangn on to an opcode renderer instance
        self.opcoderend = None

        # If a VdbGui instance is present it will set this.
        self.gui = None

        self.setMode("NonBlocking", True)

        self.manageTrace(trace)
        self.registerNotifier(vtrace.NOTIFY_ALL, self)

        # FIXME if config verbose
        #self.registerNotifier(vtrace.NOTIFY_ALL, vtrace.VerboseNotifier())

        self.vdbhome = e_config.gethomedir(".vdb")

        self.loadConfig()

        self.setupSignalLookups()

        # Ok... from here down we're handing everybody the crazy
        # on-demand-resolved trace object.
        trace = vdb.VdbTrace(self)
        e_cli.EnviMutableCli.__init__(self, trace, self.config, symobj=trace)

        self.prompt = "vdb > "
        self.banner = "Welcome To VDB!\n"

        self.loadDefaultRenderers(trace)
        self.loadExtensions(trace)
Exemple #6
0
    def __init__(self, db, gui):

        trace = vdb.VdbTrace(db)
        self.db = db

        # The vdb instance *is* the cli object.
        vw_windows.MainWindow.__init__(self, db, trace, syms=trace)

        self.gui = gui
        self.set_title("Vdb")
        self.menubar.addField("File.Save.Layout", self.file_save_layout)
        self.menubar.addField("File.Save.Snapshot", self.file_save_snapshot)
        self.menubar.addField("File.Quit", self.file_quit)
        self.menubar.addField("Edit.Copy", self.file_edit_copy)
        self.menubar.addField("View.Memory Window", self.file_view_memwin)
        self.menubar.addField("View.Memory Maps", self.file_view_memmaps)
        self.menubar.addField("View.Registers", self.file_view_registers)
        self.menubar.addField("View.File Descriptors", self.file_view_filedesc)
        self.menubar.addField("Tools.Python", self.tools_python)

        # On delete, lets save off the layout...
        self.connect('delete_event', self._mainDelete)
Exemple #7
0
    def __init__(self, db):
        vtrace.Notifier.__init__(self)
        # Gui constructor needs these set...
        self._db = db
        self._db_t = vdb.VdbTrace(db)
        self._db.registerNotifier(vtrace.NOTIFY_ALL, self)

        vq_app.VQMainCmdWindow.__init__(self, 'Vdb', db)

        tbar = vtrace_qt.VQTraceToolBar(self._db_t, parent=self)
        self.addToolBar(QtCore.Qt.TopToolBarArea, tbar)

        self.vqAddMenuField('&File.&Quit', self.menuFileQuit)
        self.vqAddMenuField('&View.&Memory', self.menuViewMemory)
        self.vqAddMenuField('&View.&Memory Maps', self.menuViewMemMaps)
        self.vqAddMenuField('&View.&Threads', self.menuViewThreads)
        self.vqAddMenuField('&View.&Registers', self.menuViewRegisters)
        self.vqAddMenuField('&View.&File Descriptors', self.menuViewFileDesc)
        self.vqAddMenuField('&View.&Layouts.&Load', self.menuViewLayoutsLoad)
        self.vqAddMenuField('&View.&Layouts.&Save', self.menuViewLayoutsSave)
        self.vqAddMenuField('&View.&Layouts.&Clear', self.menuViewLayoutsClear)
        self.vqAddMenuField('&Tools.&Python', self.menuToolsPython)
Exemple #8
0
 def tools_python(self, *args):
     import vwidget.pydialog as vw_pydialog
     l = vtrace.VtraceExpressionLocals(vdb.VdbTrace(self.db))
     p = vw_pydialog.PyDialog(l)
     p.show()
Exemple #9
0
 def getMainToolbar(self):
     trace = vdb.VdbTrace(self.db)
     return vw_vtrace.TraceToolBar(trace)
Exemple #10
0
 def __init__(self, db, gui, vtclass):
     VdbWindow.__init__(self, db, gui)
     trace = vdb.VdbTrace(db)
     self.vtview = vtclass(trace)
     self.add(self.vtview)