(self, ptr, flags, from_api=False)
Adds Address to display

            ptr - str or int
            flags - int
Adds Address to display
Adds Address to display
def add_address(self, ptr, flags, from_api=False):
        """ Adds Address to display

            ptr - str or int
            flags - int
        """
        if isinstance(ptr, str):
            ptr = utils.parse_ptr(ptr)

        if not isinstance(flags, int):
            try:
                flags = int(flags, 10)
            except ValueError:
                flags = 3

        if not from_api:
            # function was called directly so add it to dwarf
            if not self._app_window.dwarf.is_address_watched(ptr):
                self._app_window.dwarf.dwarf_api('putWatchpoint', [ptr, flags])
                return

        # show header
        self.list_view.setHeaderHidden(False)

        # create items to add
        if self._uppercase_hex:
            str_frmt = '0x{0:X}'
        else:
            str_frmt = '0x{0:x}'

        addr = QStandardItem()
        addr.setText(str_frmt.format(ptr))

        read = QStandardItem()
        write = QStandardItem()
        execute = QStandardItem()
        singleshot = QStandardItem()

        if flags & self.MEMORY_ACCESS_READ:
            read.setIcon(self._dot_icon)
        if flags & self.MEMORY_ACCESS_WRITE:
            write.setIcon(self._dot_icon)
        if flags & self.MEMORY_ACCESS_EXECUTE:
            execute.setIcon(self._dot_icon)
        if flags & self.MEMORY_WATCH_SINGLESHOT:
            singleshot.setIcon(self._dot_icon)

        # add items as new row on top
        self._watchpoints_model.insertRow(
            0, [addr, read, write, execute, singleshot])
def add_address ( self , ptr , flags , from_api = False ) : if isinstance ( ptr , str ) : ptr = utils . parse_ptr ( ptr ) if not isinstance ( flags , int ) : try : flags = int ( flags , 10 ) except ValueError : flags = 3 if not from_api : # function was called directly so add it to dwarf if not self . _app_window . dwarf . is_address_watched ( ptr ) : self . _app_window . dwarf . dwarf_api ( 'putWatchpoint' , [ ptr , flags ] ) return # show header self . list_view . setHeaderHidden ( False ) # create items to add if self . _uppercase_hex : str_frmt = '0x{0:X}' else : str_frmt = '0x{0:x}' addr = QStandardItem ( ) addr . setText ( str_frmt . format ( ptr ) ) read = QStandardItem ( ) write = QStandardItem ( ) execute = QStandardItem ( ) singleshot = QStandardItem ( ) if flags & self . MEMORY_ACCESS_READ : read . setIcon ( self . _dot_icon ) if flags & self . MEMORY_ACCESS_WRITE : write . setIcon ( self . _dot_icon ) if flags & self . MEMORY_ACCESS_EXECUTE : execute . setIcon ( self . _dot_icon ) if flags & self . MEMORY_WATCH_SINGLESHOT : singleshot . setIcon ( self . _dot_icon ) # add items as new row on top self . _watchpoints_model . insertRow ( 0 , [ addr , read , write , execute , singleshot ] )