Exemple #1
0
 def refresh(self, int_address, offset, data_array=None, breakpoint_info=None):
     int_address = SysUtils.modulo_address(int_address, GDB_Engine.inferior_arch)
     self.breakpoint_list.clear()
     if data_array is None:
         self.data_array = GDB_Engine.hex_dump(int_address, offset)
     else:
         self.data_array = data_array
     if breakpoint_info is None:
         breakpoint_info = GDB_Engine.get_breakpoint_info()
     for breakpoint in breakpoint_info:
         breakpoint_address = int(breakpoint.address, 16)
         for i in range(breakpoint.size):
             self.breakpoint_list.add(SysUtils.modulo_address(breakpoint_address + i, GDB_Engine.inferior_arch))
     self.current_address = int_address
     self.layoutChanged.emit()
Exemple #2
0
 def data(self, QModelIndex, int_role=None):
     if not QModelIndex.isValid():
         return QVariant()
     if int_role == Qt.BackgroundColorRole:
         address = self.current_address + QModelIndex.row() * self.column_count + QModelIndex.column()
         if SysUtils.modulo_address(address, GDB_Engine.inferior_arch) in self.breakpoint_list:
             return QVariant(QColor(Qt.red))
     elif int_role != Qt.DisplayRole:
         return QVariant()
     if self.data_array is None:
         return QVariant()
     return QVariant(self.data_array[QModelIndex.row() * self.column_count + QModelIndex.column()])
Exemple #3
0
 def data(self, QModelIndex, int_role=None):
     if not QModelIndex.isValid():
         return QVariant()
     if int_role == Qt.BackgroundColorRole:
         address = self.current_address + QModelIndex.row() * self.column_count + QModelIndex.column()
         if SysUtils.modulo_address(address, GDB_Engine.inferior_arch) in self.breakpoint_list:
             return QVariant(QColor(Qt.red))
     elif int_role != Qt.DisplayRole:
         return QVariant()
     if self.data_array is None:
         return QVariant()
     return QVariant(
         SysUtils.aob_to_str(self.data_array[QModelIndex.row() * self.column_count + QModelIndex.column()]))
Exemple #4
0
 def refresh(self,
             int_address,
             offset,
             data_array=None,
             breakpoint_info=None):
     int_address = SysUtils.modulo_address(int_address,
                                           GDB_Engine.inferior_arch)
     self.breakpoint_list.clear()
     if data_array is None:
         self.data_array = GDB_Engine.hex_dump(int_address, offset)
     else:
         self.data_array = data_array
     if breakpoint_info is None:
         breakpoint_info = GDB_Engine.get_breakpoint_info()
     for breakpoint in breakpoint_info:
         breakpoint_address = int(breakpoint.address, 16)
         for i in range(breakpoint.size):
             self.breakpoint_list.add(
                 SysUtils.modulo_address(breakpoint_address + i,
                                         GDB_Engine.inferior_arch))
     self.current_address = int_address
     self.layoutChanged.emit()
Exemple #5
0
 def get_selected_address(self):
     ci = self.currentIndex()
     current_address = self.model().current_address + ci.row() * self.model(
     ).columnCount() + ci.column()
     return SysUtils.modulo_address(current_address,
                                    GDB_Engine.inferior_arch)
Exemple #6
0
 def get_selected_address(self):
     ci = self.currentIndex()
     current_address = self.model().current_address + ci.row() * self.model().columnCount() + ci.column()
     return SysUtils.modulo_address(current_address, GDB_Engine.inferior_arch)