GUI: Replacing uint_t and int_t
This commit is contained in:
		
							parent
							
								
									b48fd41967
								
							
						
					
					
						commit
						33dea5d705
					
				|  | @ -460,7 +460,7 @@ void AbstractTableView::keyPressEvent(QKeyEvent* event) | ||||||
|  */ |  */ | ||||||
| void AbstractTableView::vertSliderActionSlot(int action) | void AbstractTableView::vertSliderActionSlot(int action) | ||||||
| { | { | ||||||
|     int_t wDelta = 0; |     dsint wDelta = 0; | ||||||
|     int wSliderPos = verticalScrollBar()->sliderPosition(); |     int wSliderPos = verticalScrollBar()->sliderPosition(); | ||||||
|     int wNewScrollBarValue; |     int wNewScrollBarValue; | ||||||
| 
 | 
 | ||||||
|  | @ -531,11 +531,11 @@ void AbstractTableView::vertSliderActionSlot(int action) | ||||||
|  * |  * | ||||||
|  * @return      Return the value of the new table offset. |  * @return      Return the value of the new table offset. | ||||||
|  */ |  */ | ||||||
| int_t AbstractTableView::sliderMovedHook(int type, int_t value, int_t delta) | dsint AbstractTableView::sliderMovedHook(int type, dsint value, dsint delta) | ||||||
| { | { | ||||||
|     Q_UNUSED(type); |     Q_UNUSED(type); | ||||||
|     int_t wValue = value + delta; |     dsint wValue = value + delta; | ||||||
|     int_t wMax = getRowCount() - getViewableRowsCount() + 1; |     dsint wMax = getRowCount() - getViewableRowsCount() + 1; | ||||||
| 
 | 
 | ||||||
|     // Bounding
 |     // Bounding
 | ||||||
|     wValue = wValue > wMax ? wMax : wValue; |     wValue = wValue > wMax ? wMax : wValue; | ||||||
|  | @ -553,17 +553,17 @@ int_t AbstractTableView::sliderMovedHook(int type, int_t value, int_t delta) | ||||||
|  * @return      32bits integer. |  * @return      32bits integer. | ||||||
|  */ |  */ | ||||||
| #ifdef _WIN64 | #ifdef _WIN64 | ||||||
| int AbstractTableView::scaleFromUint64ToScrollBarRange(int_t value) | int AbstractTableView::scaleFromUint64ToScrollBarRange(dsint value) | ||||||
| { | { | ||||||
|     if(mScrollBarAttributes.is64 == true) |     if(mScrollBarAttributes.is64 == true) | ||||||
|     { |     { | ||||||
|         int_t wValue = ((int_t)value) >> mScrollBarAttributes.rightShiftCount; |         dsint wValue = ((dsint)value) >> mScrollBarAttributes.rightShiftCount; | ||||||
|         int_t wValueMax = ((int_t)getRowCount() - 1) >> mScrollBarAttributes.rightShiftCount; |         dsint wValueMax = ((dsint)getRowCount() - 1) >> mScrollBarAttributes.rightShiftCount; | ||||||
| 
 | 
 | ||||||
|         if(value == ((int_t)getRowCount() - 1)) |         if(value == ((dsint)getRowCount() - 1)) | ||||||
|             return (int)(verticalScrollBar()->maximum()); |             return (int)(verticalScrollBar()->maximum()); | ||||||
|         else |         else | ||||||
|             return (int)((int_t)((int_t)verticalScrollBar()->maximum() * (int_t)wValue) / (int_t)wValueMax); |             return (int)((dsint)((dsint)verticalScrollBar()->maximum() * (dsint)wValue) / (dsint)wValueMax); | ||||||
|     } |     } | ||||||
|     else |     else | ||||||
|     { |     { | ||||||
|  | @ -581,20 +581,20 @@ int AbstractTableView::scaleFromUint64ToScrollBarRange(int_t value) | ||||||
|  * @return      64bits integer. |  * @return      64bits integer. | ||||||
|  */ |  */ | ||||||
| #ifdef _WIN64 | #ifdef _WIN64 | ||||||
| int_t AbstractTableView::scaleFromScrollBarRangeToUint64(int value) | dsint AbstractTableView::scaleFromScrollBarRangeToUint64(int value) | ||||||
| { | { | ||||||
|     if(mScrollBarAttributes.is64 == true) |     if(mScrollBarAttributes.is64 == true) | ||||||
|     { |     { | ||||||
|         int_t wValueMax = ((int_t)getRowCount() - 1) >> mScrollBarAttributes.rightShiftCount; |         dsint wValueMax = ((dsint)getRowCount() - 1) >> mScrollBarAttributes.rightShiftCount; | ||||||
| 
 | 
 | ||||||
|         if(value == (int)0x7FFFFFFF) |         if(value == (int)0x7FFFFFFF) | ||||||
|             return (int_t)(getRowCount() - 1); |             return (dsint)(getRowCount() - 1); | ||||||
|         else |         else | ||||||
|             return (int_t)(((int_t)((int_t)wValueMax * (int_t)value) / (int_t)0x7FFFFFFF) << mScrollBarAttributes.rightShiftCount); |             return (dsint)(((dsint)((dsint)wValueMax * (dsint)value) / (dsint)0x7FFFFFFF) << mScrollBarAttributes.rightShiftCount); | ||||||
|     } |     } | ||||||
|     else |     else | ||||||
|     { |     { | ||||||
|         return (int_t)value; |         return (dsint)value; | ||||||
|     } |     } | ||||||
| } | } | ||||||
| #endif | #endif | ||||||
|  | @ -607,14 +607,14 @@ int_t AbstractTableView::scaleFromScrollBarRangeToUint64(int value) | ||||||
|  * |  * | ||||||
|  * @return      32bits integer. |  * @return      32bits integer. | ||||||
|  */ |  */ | ||||||
| void AbstractTableView::updateScrollBarRange(int_t range) | void AbstractTableView::updateScrollBarRange(dsint range) | ||||||
| { | { | ||||||
|     int_t wMax = range - getViewableRowsCount() + 1; |     dsint wMax = range - getViewableRowsCount() + 1; | ||||||
| 
 | 
 | ||||||
|     if(wMax > 0) |     if(wMax > 0) | ||||||
|     { |     { | ||||||
| #ifdef _WIN64 | #ifdef _WIN64 | ||||||
|         if((uint_t)wMax < (uint_t)0x0000000080000000) |         if((duint)wMax < (duint)0x0000000080000000) | ||||||
|         { |         { | ||||||
|             mScrollBarAttributes.is64 = false; |             mScrollBarAttributes.is64 = false; | ||||||
|             mScrollBarAttributes.rightShiftCount = 0; |             mScrollBarAttributes.rightShiftCount = 0; | ||||||
|  | @ -622,13 +622,13 @@ void AbstractTableView::updateScrollBarRange(int_t range) | ||||||
|         } |         } | ||||||
|         else |         else | ||||||
|         { |         { | ||||||
|             uint_t wMask = 0x8000000000000000; |             duint wMask = 0x8000000000000000; | ||||||
|             int wLeadingZeroCount; |             int wLeadingZeroCount; | ||||||
| 
 | 
 | ||||||
|             // Count leading zeros
 |             // Count leading zeros
 | ||||||
|             for(wLeadingZeroCount = 0; wLeadingZeroCount < 64; wLeadingZeroCount++) |             for(wLeadingZeroCount = 0; wLeadingZeroCount < 64; wLeadingZeroCount++) | ||||||
|             { |             { | ||||||
|                 if((uint_t)wMax < wMask) |                 if((duint)wMax < wMask) | ||||||
|                 { |                 { | ||||||
|                     wMask = wMask >> 1; |                     wMask = wMask >> 1; | ||||||
|                 } |                 } | ||||||
|  | @ -760,8 +760,8 @@ int AbstractTableView::getViewableRowsCount() | ||||||
| int AbstractTableView::getLineToPrintcount() | int AbstractTableView::getLineToPrintcount() | ||||||
| { | { | ||||||
|     int wViewableRowsCount = getViewableRowsCount(); |     int wViewableRowsCount = getViewableRowsCount(); | ||||||
|     int_t wRemainingRowsCount = getRowCount() - mTableOffset; |     dsint wRemainingRowsCount = getRowCount() - mTableOffset; | ||||||
|     int wCount = (int_t)wRemainingRowsCount > (int_t)wViewableRowsCount ? (int)wViewableRowsCount : (int)wRemainingRowsCount; |     int wCount = (dsint)wRemainingRowsCount > (dsint)wViewableRowsCount ? (int)wViewableRowsCount : (int)wRemainingRowsCount; | ||||||
|     return wCount; |     return wCount; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -794,7 +794,7 @@ void AbstractTableView::addColumnAt(int width, QString title, bool isClickable) | ||||||
|     mColumnList.append(wColumn); |     mColumnList.append(wColumn); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void AbstractTableView::setRowCount(int_t count) | void AbstractTableView::setRowCount(dsint count) | ||||||
| { | { | ||||||
|     updateScrollBarRange(count); |     updateScrollBarRange(count); | ||||||
|     mRowCount = count; |     mRowCount = count; | ||||||
|  | @ -825,7 +825,7 @@ QString AbstractTableView::getColTitle(int index) | ||||||
| /************************************************************************************
 | /************************************************************************************
 | ||||||
|                                 Getter & Setter |                                 Getter & Setter | ||||||
| ************************************************************************************/ | ************************************************************************************/ | ||||||
| int_t AbstractTableView::getRowCount() | dsint AbstractTableView::getRowCount() | ||||||
| { | { | ||||||
|     return mRowCount; |     return mRowCount; | ||||||
| } | } | ||||||
|  | @ -906,15 +906,15 @@ int AbstractTableView::getCharWidth() | ||||||
| /************************************************************************************
 | /************************************************************************************
 | ||||||
|                            Table Offset Management |                            Table Offset Management | ||||||
| ************************************************************************************/ | ************************************************************************************/ | ||||||
| int_t AbstractTableView::getTableOffset() | dsint AbstractTableView::getTableOffset() | ||||||
| { | { | ||||||
|     return mTableOffset; |     return mTableOffset; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| void AbstractTableView::setTableOffset(int_t val) | void AbstractTableView::setTableOffset(dsint val) | ||||||
| { | { | ||||||
|     int_t wMaxOffset = getRowCount() - getViewableRowsCount() + 1; |     dsint wMaxOffset = getRowCount() - getViewableRowsCount() + 1; | ||||||
|     wMaxOffset = wMaxOffset > 0 ? wMaxOffset : 0; |     wMaxOffset = wMaxOffset > 0 ? wMaxOffset : 0; | ||||||
|     if(val > wMaxOffset) |     if(val > wMaxOffset) | ||||||
|         return; |         return; | ||||||
|  | @ -957,6 +957,6 @@ void AbstractTableView::repaint() | ||||||
| void AbstractTableView::prepareData() | void AbstractTableView::prepareData() | ||||||
| { | { | ||||||
|     int wViewableRowsCount = getViewableRowsCount(); |     int wViewableRowsCount = getViewableRowsCount(); | ||||||
|     int_t wRemainingRowsCount = getRowCount() - mTableOffset; |     dsint wRemainingRowsCount = getRowCount() - mTableOffset; | ||||||
|     mNbrOfLineToPrint = (int_t)wRemainingRowsCount > (int_t)wViewableRowsCount ? (int)wViewableRowsCount : (int)wRemainingRowsCount; |     mNbrOfLineToPrint = (dsint)wRemainingRowsCount > (dsint)wViewableRowsCount ? (int)wViewableRowsCount : (int)wRemainingRowsCount; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -48,7 +48,7 @@ public: | ||||||
|     virtual void fontsUpdated(); |     virtual void fontsUpdated(); | ||||||
| 
 | 
 | ||||||
|     // Pure Virtual Methods
 |     // Pure Virtual Methods
 | ||||||
|     virtual QString paintContent(QPainter* painter, int_t rowBase, int rowOffset, int col, int x, int y, int w, int h) = 0; |     virtual QString paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h) = 0; | ||||||
| 
 | 
 | ||||||
|     // Painting Stuff
 |     // Painting Stuff
 | ||||||
|     void paintEvent(QPaintEvent* event); |     void paintEvent(QPaintEvent* event); | ||||||
|  | @ -62,10 +62,10 @@ public: | ||||||
|     void keyPressEvent(QKeyEvent* event); |     void keyPressEvent(QKeyEvent* event); | ||||||
| 
 | 
 | ||||||
|     // ScrollBar Management
 |     // ScrollBar Management
 | ||||||
|     virtual int_t sliderMovedHook(int type, int_t value, int_t delta); |     virtual dsint sliderMovedHook(int type, dsint value, dsint delta); | ||||||
|     int scaleFromUint64ToScrollBarRange(int_t value); |     int scaleFromUint64ToScrollBarRange(dsint value); | ||||||
|     int_t scaleFromScrollBarRangeToUint64(int value); |     dsint scaleFromScrollBarRangeToUint64(int value); | ||||||
|     void updateScrollBarRange(int_t range); |     void updateScrollBarRange(dsint range); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|     // Coordinates Utils
 |     // Coordinates Utils
 | ||||||
|  | @ -78,13 +78,13 @@ public: | ||||||
| 
 | 
 | ||||||
|     // New Columns/New Size
 |     // New Columns/New Size
 | ||||||
|     virtual void addColumnAt(int width, QString title, bool isClickable); |     virtual void addColumnAt(int width, QString title, bool isClickable); | ||||||
|     virtual void setRowCount(int_t count); |     virtual void setRowCount(dsint count); | ||||||
|     virtual void deleteAllColumns(); |     virtual void deleteAllColumns(); | ||||||
|     void setColTitle(int index, QString title); |     void setColTitle(int index, QString title); | ||||||
|     QString getColTitle(int index); |     QString getColTitle(int index); | ||||||
| 
 | 
 | ||||||
|     // Getter & Setter
 |     // Getter & Setter
 | ||||||
|     int_t getRowCount(); |     dsint getRowCount(); | ||||||
|     int getColumnCount(); |     int getColumnCount(); | ||||||
|     int getRowHeight(); |     int getRowHeight(); | ||||||
|     int getColumnWidth(int index); |     int getColumnWidth(int index); | ||||||
|  | @ -98,8 +98,8 @@ public: | ||||||
|     int getCharWidth(); |     int getCharWidth(); | ||||||
| 
 | 
 | ||||||
|     // Table Offset Management
 |     // Table Offset Management
 | ||||||
|     int_t getTableOffset(); |     dsint getTableOffset(); | ||||||
|     void setTableOffset(int_t val); |     void setTableOffset(dsint val); | ||||||
| 
 | 
 | ||||||
|     // Update/Reload/Refresh/Repaint
 |     // Update/Reload/Refresh/Repaint
 | ||||||
|     virtual void prepareData(); |     virtual void prepareData(); | ||||||
|  | @ -108,7 +108,7 @@ signals: | ||||||
|     void enterPressedSignal(); |     void enterPressedSignal(); | ||||||
|     void headerButtonPressed(int col); |     void headerButtonPressed(int col); | ||||||
|     void headerButtonReleased(int col); |     void headerButtonReleased(int col); | ||||||
|     void tableOffsetChanged(int_t i); |     void tableOffsetChanged(dsint i); | ||||||
|     void viewableRows(int rows); |     void viewableRows(int rows); | ||||||
|     void repainted(); |     void repainted(); | ||||||
| 
 | 
 | ||||||
|  | @ -166,16 +166,16 @@ private: | ||||||
| 
 | 
 | ||||||
|     QList<Column_t> mColumnList; |     QList<Column_t> mColumnList; | ||||||
| 
 | 
 | ||||||
|     int_t mRowCount; |     dsint mRowCount; | ||||||
| 
 | 
 | ||||||
|     int mMouseWheelScrollDelta; |     int mMouseWheelScrollDelta; | ||||||
| 
 | 
 | ||||||
|     int_t mTableOffset; |     dsint mTableOffset; | ||||||
|     Header_t mHeader; |     Header_t mHeader; | ||||||
| 
 | 
 | ||||||
|     int mNbrOfLineToPrint; |     int mNbrOfLineToPrint; | ||||||
| 
 | 
 | ||||||
|     int_t mPrevTableOffset; |     dsint mPrevTableOffset; | ||||||
| 
 | 
 | ||||||
|     bool mShouldReload; |     bool mShouldReload; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -32,7 +32,7 @@ Disassembly::Disassembly(QWidget* parent) : AbstractTableView(parent) | ||||||
| 
 | 
 | ||||||
|     setRowCount(mMemPage->getSize()); |     setRowCount(mMemPage->getSize()); | ||||||
| 
 | 
 | ||||||
|     addColumnAt(getCharWidth() * 2 * sizeof(int_t) + 8, "", false); //address
 |     addColumnAt(getCharWidth() * 2 * sizeof(dsint) + 8, "", false); //address
 | ||||||
|     addColumnAt(getCharWidth() * 2 * 12 + 8, "", false); //bytes
 |     addColumnAt(getCharWidth() * 2 * 12 + 8, "", false); //bytes
 | ||||||
|     addColumnAt(getCharWidth() * 40, "", false); //disassembly
 |     addColumnAt(getCharWidth() * 40, "", false); //disassembly
 | ||||||
|     addColumnAt(1000, "", false); //comments
 |     addColumnAt(1000, "", false); //comments
 | ||||||
|  | @ -73,7 +73,7 @@ void Disassembly::fontsUpdated() | ||||||
|  * |  * | ||||||
|  * @return      String to paint. |  * @return      String to paint. | ||||||
|  */ |  */ | ||||||
| QString Disassembly::paintContent(QPainter* painter, int_t rowBase, int rowOffset, int col, int x, int y, int w, int h) | QString Disassembly::paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h) | ||||||
| { | { | ||||||
|     Q_UNUSED(rowBase) |     Q_UNUSED(rowBase) | ||||||
|     if(mHighlightingMode) |     if(mHighlightingMode) | ||||||
|  | @ -85,7 +85,7 @@ QString Disassembly::paintContent(QPainter* painter, int_t rowBase, int rowOffse | ||||||
|         rect.adjust(1, 1, -1, -1); |         rect.adjust(1, 1, -1, -1); | ||||||
|         painter->drawRect(rect); |         painter->drawRect(rect); | ||||||
|     } |     } | ||||||
|     int_t wRVA = mInstBuffer.at(rowOffset).rva; |     dsint wRVA = mInstBuffer.at(rowOffset).rva; | ||||||
|     bool wIsSelected = isSelected(&mInstBuffer, rowOffset); |     bool wIsSelected = isSelected(&mInstBuffer, rowOffset); | ||||||
| 
 | 
 | ||||||
|     // Highlight if selected
 |     // Highlight if selected
 | ||||||
|  | @ -97,7 +97,7 @@ QString Disassembly::paintContent(QPainter* painter, int_t rowBase, int rowOffse | ||||||
|     case 0: // Draw address (+ label)
 |     case 0: // Draw address (+ label)
 | ||||||
|     { |     { | ||||||
|         char label[MAX_LABEL_SIZE] = ""; |         char label[MAX_LABEL_SIZE] = ""; | ||||||
|         int_t cur_addr = rvaToVa(mInstBuffer.at(rowOffset).rva); |         dsint cur_addr = rvaToVa(mInstBuffer.at(rowOffset).rva); | ||||||
|         QString addrText = getAddrText(cur_addr, label); |         QString addrText = getAddrText(cur_addr, label); | ||||||
|         BPXTYPE bpxtype = DbgGetBpxTypeAt(cur_addr); |         BPXTYPE bpxtype = DbgGetBpxTypeAt(cur_addr); | ||||||
|         bool isbookmark = DbgGetBookmarkAt(cur_addr); |         bool isbookmark = DbgGetBookmarkAt(cur_addr); | ||||||
|  | @ -280,7 +280,7 @@ QString Disassembly::paintContent(QPainter* painter, int_t rowBase, int rowOffse | ||||||
|     case 1: //draw bytes (TODO: some spaces between bytes)
 |     case 1: //draw bytes (TODO: some spaces between bytes)
 | ||||||
|     { |     { | ||||||
|         //draw functions
 |         //draw functions
 | ||||||
|         int_t cur_addr = rvaToVa(mInstBuffer.at(rowOffset).rva); |         dsint cur_addr = rvaToVa(mInstBuffer.at(rowOffset).rva); | ||||||
|         Function_t funcType; |         Function_t funcType; | ||||||
|         FUNCTYPE funcFirst = DbgGetFunctionTypeAt(cur_addr); |         FUNCTYPE funcFirst = DbgGetFunctionTypeAt(cur_addr); | ||||||
|         FUNCTYPE funcLast = DbgGetFunctionTypeAt(cur_addr + mInstBuffer.at(rowOffset).length - 1); |         FUNCTYPE funcLast = DbgGetFunctionTypeAt(cur_addr + mInstBuffer.at(rowOffset).length - 1); | ||||||
|  | @ -334,7 +334,7 @@ QString Disassembly::paintContent(QPainter* painter, int_t rowBase, int rowOffse | ||||||
| 
 | 
 | ||||||
|     case 2: //draw disassembly (with colours needed)
 |     case 2: //draw disassembly (with colours needed)
 | ||||||
|     { |     { | ||||||
|         int_t cur_addr = rvaToVa(mInstBuffer.at(rowOffset).rva); |         dsint cur_addr = rvaToVa(mInstBuffer.at(rowOffset).rva); | ||||||
|         int loopsize = 0; |         int loopsize = 0; | ||||||
|         int depth = 0; |         int depth = 0; | ||||||
| 
 | 
 | ||||||
|  | @ -447,8 +447,8 @@ void Disassembly::mouseMoveEvent(QMouseEvent* event) | ||||||
|                 wI = wI >= mInstBuffer.size() ? mInstBuffer.size() - 1 : wI; |                 wI = wI >= mInstBuffer.size() ? mInstBuffer.size() - 1 : wI; | ||||||
|                 wI = wI < 0 ? 0 : wI; |                 wI = wI < 0 ? 0 : wI; | ||||||
| 
 | 
 | ||||||
|                 int_t wRowIndex = mInstBuffer.at(wI).rva; |                 dsint wRowIndex = mInstBuffer.at(wI).rva; | ||||||
|                 int_t wInstrSize = getInstructionRVA(wRowIndex, 1) - wRowIndex - 1; |                 dsint wInstrSize = getInstructionRVA(wRowIndex, 1) - wRowIndex - 1; | ||||||
| 
 | 
 | ||||||
|                 if(wRowIndex < getRowCount()) |                 if(wRowIndex < getRowCount()) | ||||||
|                 { |                 { | ||||||
|  | @ -521,8 +521,8 @@ void Disassembly::mousePressEvent(QMouseEvent* event) | ||||||
|             } |             } | ||||||
|             else if(event->y() > getHeaderHeight()) |             else if(event->y() > getHeaderHeight()) | ||||||
|             { |             { | ||||||
|                 int_t wRowIndex = getInstructionRVA(getTableOffset(), getIndexOffsetFromY(transY(event->y()))); |                 dsint wRowIndex = getInstructionRVA(getTableOffset(), getIndexOffsetFromY(transY(event->y()))); | ||||||
|                 int_t wInstrSize = getInstructionRVA(wRowIndex, 1) - wRowIndex - 1; |                 dsint wInstrSize = getInstructionRVA(wRowIndex, 1) - wRowIndex - 1; | ||||||
| 
 | 
 | ||||||
|                 if(wRowIndex < getRowCount()) |                 if(wRowIndex < getRowCount()) | ||||||
|                 { |                 { | ||||||
|  | @ -600,8 +600,8 @@ void Disassembly::keyPressEvent(QKeyEvent* event) | ||||||
| 
 | 
 | ||||||
|     if(key == Qt::Key_Up || key == Qt::Key_Down) |     if(key == Qt::Key_Up || key == Qt::Key_Down) | ||||||
|     { |     { | ||||||
|         int_t botRVA = getTableOffset(); |         dsint botRVA = getTableOffset(); | ||||||
|         int_t topRVA = getInstructionRVA(getTableOffset(), getNbrOfLineToPrint() - 1); |         dsint topRVA = getInstructionRVA(getTableOffset(), getNbrOfLineToPrint() - 1); | ||||||
| 
 | 
 | ||||||
|         bool expand = false; |         bool expand = false; | ||||||
|         if(event->modifiers() & Qt::ShiftModifier) //SHIFT pressed
 |         if(event->modifiers() & Qt::ShiftModifier) //SHIFT pressed
 | ||||||
|  | @ -625,10 +625,10 @@ void Disassembly::keyPressEvent(QKeyEvent* event) | ||||||
|     } |     } | ||||||
|     else if(key == Qt::Key_Return || key == Qt::Key_Enter) |     else if(key == Qt::Key_Return || key == Qt::Key_Enter) | ||||||
|     { |     { | ||||||
|         uint_t dest = DbgGetBranchDestination(rvaToVa(getInitialSelection())); |         duint dest = DbgGetBranchDestination(rvaToVa(getInitialSelection())); | ||||||
|         if(!dest) |         if(!dest) | ||||||
|             return; |             return; | ||||||
|         QString cmd = "disasm " + QString("%1").arg(dest, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         QString cmd = "disasm " + QString("%1").arg(dest, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|         DbgCmdExec(cmd.toUtf8().constData()); |         DbgCmdExec(cmd.toUtf8().constData()); | ||||||
|     } |     } | ||||||
|     else |     else | ||||||
|  | @ -649,9 +649,9 @@ void Disassembly::keyPressEvent(QKeyEvent* event) | ||||||
|  * |  * | ||||||
|  * @return      Return the value of the new table offset. |  * @return      Return the value of the new table offset. | ||||||
|  */ |  */ | ||||||
| int_t Disassembly::sliderMovedHook(int type, int_t value, int_t delta) | dsint Disassembly::sliderMovedHook(int type, dsint value, dsint delta) | ||||||
| { | { | ||||||
|     int_t wNewValue; |     dsint wNewValue; | ||||||
| 
 | 
 | ||||||
|     if(type == QAbstractSlider::SliderNoAction) // QAbstractSlider::SliderNoAction is used to disassembe at a specific address
 |     if(type == QAbstractSlider::SliderNoAction) // QAbstractSlider::SliderNoAction is used to disassembe at a specific address
 | ||||||
|     { |     { | ||||||
|  | @ -689,10 +689,10 @@ int_t Disassembly::sliderMovedHook(int type, int_t value, int_t delta) | ||||||
|  * |  * | ||||||
|  * @return      Nothing. |  * @return      Nothing. | ||||||
|  */ |  */ | ||||||
| int Disassembly::paintJumpsGraphic(QPainter* painter, int x, int y, int_t addr) | int Disassembly::paintJumpsGraphic(QPainter* painter, int x, int y, dsint addr) | ||||||
| { | { | ||||||
|     int_t selHeadRVA = mSelection.fromIndex; |     dsint selHeadRVA = mSelection.fromIndex; | ||||||
|     int_t rva = addr; |     dsint rva = addr; | ||||||
|     Instruction_t instruction = DisassembleAt(selHeadRVA); |     Instruction_t instruction = DisassembleAt(selHeadRVA); | ||||||
|     Int32 branchType = instruction.disasm.Instruction.BranchType; |     Int32 branchType = instruction.disasm.Instruction.BranchType; | ||||||
| 
 | 
 | ||||||
|  | @ -700,12 +700,12 @@ int Disassembly::paintJumpsGraphic(QPainter* painter, int x, int y, int_t addr) | ||||||
| 
 | 
 | ||||||
|     if(branchType && branchType != RetType && branchType != CallType) |     if(branchType && branchType != RetType && branchType != CallType) | ||||||
|     { |     { | ||||||
|         int_t destRVA = (int_t)DbgGetBranchDestination(rvaToVa(instruction.rva)); |         dsint destRVA = (dsint)DbgGetBranchDestination(rvaToVa(instruction.rva)); | ||||||
| 
 | 
 | ||||||
|         int_t base = mMemPage->getBase(); |         dsint base = mMemPage->getBase(); | ||||||
|         if(destRVA >= base && destRVA < base + (int_t)mMemPage->getSize()) |         if(destRVA >= base && destRVA < base + (dsint)mMemPage->getSize()) | ||||||
|         { |         { | ||||||
|             destRVA -= (int_t)mMemPage->getBase(); |             destRVA -= (dsint)mMemPage->getBase(); | ||||||
| 
 | 
 | ||||||
|             if(destRVA < selHeadRVA) |             if(destRVA < selHeadRVA) | ||||||
|             { |             { | ||||||
|  | @ -889,24 +889,24 @@ int Disassembly::paintFunctionGraphic(QPainter* painter, int x, int y, Function_ | ||||||
|  * |  * | ||||||
|  * @return      RVA of count-th instructions before the given instruction RVA. |  * @return      RVA of count-th instructions before the given instruction RVA. | ||||||
|  */ |  */ | ||||||
| int_t Disassembly::getPreviousInstructionRVA(int_t rva, uint_t count) | dsint Disassembly::getPreviousInstructionRVA(dsint rva, duint count) | ||||||
| { | { | ||||||
|     QByteArray wBuffer; |     QByteArray wBuffer; | ||||||
|     int_t wBottomByteRealRVA; |     dsint wBottomByteRealRVA; | ||||||
|     int_t wVirtualRVA; |     dsint wVirtualRVA; | ||||||
|     int_t wMaxByteCountToRead ; |     dsint wMaxByteCountToRead ; | ||||||
| 
 | 
 | ||||||
|     wBottomByteRealRVA = (int_t)rva - 16 * (count + 3); |     wBottomByteRealRVA = (dsint)rva - 16 * (count + 3); | ||||||
|     wBottomByteRealRVA = wBottomByteRealRVA < 0 ? 0 : wBottomByteRealRVA; |     wBottomByteRealRVA = wBottomByteRealRVA < 0 ? 0 : wBottomByteRealRVA; | ||||||
| 
 | 
 | ||||||
|     wVirtualRVA = (int_t)rva - wBottomByteRealRVA; |     wVirtualRVA = (dsint)rva - wBottomByteRealRVA; | ||||||
| 
 | 
 | ||||||
|     wMaxByteCountToRead = wVirtualRVA + 1 + 16; |     wMaxByteCountToRead = wVirtualRVA + 1 + 16; | ||||||
|     wBuffer.resize(wMaxByteCountToRead); |     wBuffer.resize(wMaxByteCountToRead); | ||||||
| 
 | 
 | ||||||
|     mMemPage->read(reinterpret_cast<byte_t*>(wBuffer.data()), wBottomByteRealRVA, wMaxByteCountToRead); |     mMemPage->read(reinterpret_cast<byte_t*>(wBuffer.data()), wBottomByteRealRVA, wMaxByteCountToRead); | ||||||
| 
 | 
 | ||||||
|     int_t addr = mDisasm->DisassembleBack(reinterpret_cast<byte_t*>(wBuffer.data()), 0,  wMaxByteCountToRead, wVirtualRVA, count); |     dsint addr = mDisasm->DisassembleBack(reinterpret_cast<byte_t*>(wBuffer.data()), 0,  wMaxByteCountToRead, wVirtualRVA, count); | ||||||
| 
 | 
 | ||||||
|     addr += rva - wVirtualRVA; |     addr += rva - wVirtualRVA; | ||||||
| 
 | 
 | ||||||
|  | @ -922,15 +922,15 @@ int_t Disassembly::getPreviousInstructionRVA(int_t rva, uint_t count) | ||||||
|  * |  * | ||||||
|  * @return      RVA of count-th instructions after the given instruction RVA. |  * @return      RVA of count-th instructions after the given instruction RVA. | ||||||
|  */ |  */ | ||||||
| int_t Disassembly::getNextInstructionRVA(int_t rva, uint_t count) | dsint Disassembly::getNextInstructionRVA(dsint rva, duint count) | ||||||
| { | { | ||||||
|     QByteArray wBuffer; |     QByteArray wBuffer; | ||||||
|     int_t wVirtualRVA = 0; |     dsint wVirtualRVA = 0; | ||||||
|     int_t wRemainingBytes; |     dsint wRemainingBytes; | ||||||
|     int_t wMaxByteCountToRead; |     dsint wMaxByteCountToRead; | ||||||
|     int_t wNewRVA; |     dsint wNewRVA; | ||||||
| 
 | 
 | ||||||
|     if(mMemPage->getSize() < (uint_t)rva) |     if(mMemPage->getSize() < (duint)rva) | ||||||
|         return rva; |         return rva; | ||||||
|     wRemainingBytes = mMemPage->getSize() - rva; |     wRemainingBytes = mMemPage->getSize() - rva; | ||||||
| 
 | 
 | ||||||
|  | @ -955,9 +955,9 @@ int_t Disassembly::getNextInstructionRVA(int_t rva, uint_t count) | ||||||
|  * |  * | ||||||
|  * @return      RVA of count-th instructions before/after the given instruction RVA. |  * @return      RVA of count-th instructions before/after the given instruction RVA. | ||||||
|  */ |  */ | ||||||
| int_t Disassembly::getInstructionRVA(int_t index, int_t count) | dsint Disassembly::getInstructionRVA(dsint index, dsint count) | ||||||
| { | { | ||||||
|     int_t wAddr = 0; |     dsint wAddr = 0; | ||||||
| 
 | 
 | ||||||
|     if(count == 0) |     if(count == 0) | ||||||
|         wAddr = index; |         wAddr = index; | ||||||
|  | @ -983,15 +983,15 @@ int_t Disassembly::getInstructionRVA(int_t index, int_t count) | ||||||
|  * |  * | ||||||
|  * @return      Return the disassembled instruction. |  * @return      Return the disassembled instruction. | ||||||
|  */ |  */ | ||||||
| Instruction_t Disassembly::DisassembleAt(int_t rva) | Instruction_t Disassembly::DisassembleAt(dsint rva) | ||||||
| { | { | ||||||
|     QByteArray wBuffer; |     QByteArray wBuffer; | ||||||
|     int_t base = mMemPage->getBase(); |     dsint base = mMemPage->getBase(); | ||||||
|     int_t wMaxByteCountToRead = 16 * 2; |     dsint wMaxByteCountToRead = 16 * 2; | ||||||
| 
 | 
 | ||||||
|     // Bounding
 |     // Bounding
 | ||||||
|     //TODO: fix problems with negative sizes
 |     //TODO: fix problems with negative sizes
 | ||||||
|     int_t size = getSize(); |     dsint size = getSize(); | ||||||
|     if(!size) |     if(!size) | ||||||
|         size = rva; |         size = rva; | ||||||
| 
 | 
 | ||||||
|  | @ -1014,7 +1014,7 @@ Instruction_t Disassembly::DisassembleAt(int_t rva) | ||||||
|  * |  * | ||||||
|  * @return      Return the disassembled instruction. |  * @return      Return the disassembled instruction. | ||||||
|  */ |  */ | ||||||
| Instruction_t Disassembly::DisassembleAt(int_t rva, int_t count) | Instruction_t Disassembly::DisassembleAt(dsint rva, dsint count) | ||||||
| { | { | ||||||
|     rva = getNextInstructionRVA(rva, count); |     rva = getNextInstructionRVA(rva, count); | ||||||
|     return DisassembleAt(rva); |     return DisassembleAt(rva); | ||||||
|  | @ -1024,7 +1024,7 @@ Instruction_t Disassembly::DisassembleAt(int_t rva, int_t count) | ||||||
| /************************************************************************************
 | /************************************************************************************
 | ||||||
|                                 Selection Management |                                 Selection Management | ||||||
| ************************************************************************************/ | ************************************************************************************/ | ||||||
| void Disassembly::expandSelectionUpTo(int_t to) | void Disassembly::expandSelectionUpTo(dsint to) | ||||||
| { | { | ||||||
|     if(to < mSelection.firstSelectedIndex) |     if(to < mSelection.firstSelectedIndex) | ||||||
|     { |     { | ||||||
|  | @ -1040,7 +1040,7 @@ void Disassembly::expandSelectionUpTo(int_t to) | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void Disassembly::setSingleSelection(int_t index) | void Disassembly::setSingleSelection(dsint index) | ||||||
| { | { | ||||||
|     mSelection.firstSelectedIndex = index; |     mSelection.firstSelectedIndex = index; | ||||||
|     mSelection.fromIndex = index; |     mSelection.fromIndex = index; | ||||||
|  | @ -1049,30 +1049,30 @@ void Disassembly::setSingleSelection(int_t index) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| int_t Disassembly::getInitialSelection() | dsint Disassembly::getInitialSelection() | ||||||
| { | { | ||||||
|     return mSelection.firstSelectedIndex; |     return mSelection.firstSelectedIndex; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| int_t Disassembly::getSelectionSize() | dsint Disassembly::getSelectionSize() | ||||||
| { | { | ||||||
|     return mSelection.toIndex - mSelection.fromIndex; |     return mSelection.toIndex - mSelection.fromIndex; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| int_t Disassembly::getSelectionStart() | dsint Disassembly::getSelectionStart() | ||||||
| { | { | ||||||
|     return mSelection.fromIndex; |     return mSelection.fromIndex; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| int_t Disassembly::getSelectionEnd() | dsint Disassembly::getSelectionEnd() | ||||||
| { | { | ||||||
|     return mSelection.toIndex; |     return mSelection.toIndex; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void Disassembly::selectNext(bool expand) | void Disassembly::selectNext(bool expand) | ||||||
| { | { | ||||||
|     int_t wAddr; |     dsint wAddr; | ||||||
|     int_t wStart = getInstructionRVA(getSelectionStart(), 1) - 1; |     dsint wStart = getInstructionRVA(getSelectionStart(), 1) - 1; | ||||||
|     if(expand) |     if(expand) | ||||||
|     { |     { | ||||||
|         if(getSelectionEnd() == getInitialSelection() && wStart != getSelectionEnd()) //decrease down
 |         if(getSelectionEnd() == getInitialSelection() && wStart != getSelectionEnd()) //decrease down
 | ||||||
|  | @ -1083,7 +1083,7 @@ void Disassembly::selectNext(bool expand) | ||||||
|         else //expand down
 |         else //expand down
 | ||||||
|         { |         { | ||||||
|             wAddr = getSelectionEnd() + 1; |             wAddr = getSelectionEnd() + 1; | ||||||
|             int_t wInstrSize = getInstructionRVA(wAddr, 1) - wAddr - 1; |             dsint wInstrSize = getInstructionRVA(wAddr, 1) - wAddr - 1; | ||||||
|             expandSelectionUpTo(wAddr + wInstrSize); |             expandSelectionUpTo(wAddr + wInstrSize); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  | @ -1091,7 +1091,7 @@ void Disassembly::selectNext(bool expand) | ||||||
|     { |     { | ||||||
|         wAddr = getSelectionEnd() + 1; |         wAddr = getSelectionEnd() + 1; | ||||||
|         setSingleSelection(wAddr); |         setSingleSelection(wAddr); | ||||||
|         int_t wInstrSize = getInstructionRVA(wAddr, 1) - wAddr - 1; |         dsint wInstrSize = getInstructionRVA(wAddr, 1) - wAddr - 1; | ||||||
|         expandSelectionUpTo(wAddr + wInstrSize); |         expandSelectionUpTo(wAddr + wInstrSize); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | @ -1099,14 +1099,14 @@ void Disassembly::selectNext(bool expand) | ||||||
| 
 | 
 | ||||||
| void Disassembly::selectPrevious(bool expand) | void Disassembly::selectPrevious(bool expand) | ||||||
| { | { | ||||||
|     int_t wAddr; |     dsint wAddr; | ||||||
|     int_t wStart = getInstructionRVA(getSelectionStart(), 1) - 1; |     dsint wStart = getInstructionRVA(getSelectionStart(), 1) - 1; | ||||||
|     if(expand) |     if(expand) | ||||||
|     { |     { | ||||||
|         if(getSelectionStart() == getInitialSelection() && wStart != getSelectionEnd()) //decrease up
 |         if(getSelectionStart() == getInitialSelection() && wStart != getSelectionEnd()) //decrease up
 | ||||||
|         { |         { | ||||||
|             wAddr = getInstructionRVA(getSelectionEnd() + 1, -2); |             wAddr = getInstructionRVA(getSelectionEnd() + 1, -2); | ||||||
|             int_t wInstrSize = getInstructionRVA(wAddr, 1) - wAddr - 1; |             dsint wInstrSize = getInstructionRVA(wAddr, 1) - wAddr - 1; | ||||||
|             expandSelectionUpTo(wAddr + wInstrSize); |             expandSelectionUpTo(wAddr + wInstrSize); | ||||||
|         } |         } | ||||||
|         else //expand up
 |         else //expand up
 | ||||||
|  | @ -1119,15 +1119,15 @@ void Disassembly::selectPrevious(bool expand) | ||||||
|     { |     { | ||||||
|         wAddr = getInstructionRVA(getSelectionStart(), -1); |         wAddr = getInstructionRVA(getSelectionStart(), -1); | ||||||
|         setSingleSelection(wAddr); |         setSingleSelection(wAddr); | ||||||
|         int_t wInstrSize = getInstructionRVA(wAddr, 1) - wAddr - 1; |         dsint wInstrSize = getInstructionRVA(wAddr, 1) - wAddr - 1; | ||||||
|         expandSelectionUpTo(wAddr + wInstrSize); |         expandSelectionUpTo(wAddr + wInstrSize); | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| bool Disassembly::isSelected(int_t base, int_t offset) | bool Disassembly::isSelected(dsint base, dsint offset) | ||||||
| { | { | ||||||
|     int_t wAddr = base; |     dsint wAddr = base; | ||||||
| 
 | 
 | ||||||
|     if(offset < 0) |     if(offset < 0) | ||||||
|         wAddr = getPreviousInstructionRVA(getTableOffset(), offset); |         wAddr = getPreviousInstructionRVA(getTableOffset(), offset); | ||||||
|  | @ -1145,7 +1145,7 @@ bool Disassembly::isSelected(QList<Instruction_t>* buffer, int index) | ||||||
| { | { | ||||||
|     if(buffer->size() > 0 && index >= 0 && index < buffer->size()) |     if(buffer->size() > 0 && index >= 0 && index < buffer->size()) | ||||||
|     { |     { | ||||||
|         if((int_t)buffer->at(index).rva >= mSelection.fromIndex && (int_t)buffer->at(index).rva <= mSelection.toIndex) |         if((dsint)buffer->at(index).rva >= mSelection.fromIndex && (dsint)buffer->at(index).rva <= mSelection.toIndex) | ||||||
|             return true; |             return true; | ||||||
|         else |         else | ||||||
|             return false; |             return false; | ||||||
|  | @ -1161,7 +1161,7 @@ bool Disassembly::isSelected(QList<Instruction_t>* buffer, int index) | ||||||
|                          Update/Reload/Refresh/Repaint |                          Update/Reload/Refresh/Repaint | ||||||
| ************************************************************************************/ | ************************************************************************************/ | ||||||
| 
 | 
 | ||||||
| void Disassembly::prepareDataCount(int_t wRVA, int wCount, QList<Instruction_t>* instBuffer) | void Disassembly::prepareDataCount(dsint wRVA, int wCount, QList<Instruction_t>* instBuffer) | ||||||
| { | { | ||||||
|     instBuffer->clear(); |     instBuffer->clear(); | ||||||
|     Instruction_t wInst; |     Instruction_t wInst; | ||||||
|  | @ -1173,14 +1173,14 @@ void Disassembly::prepareDataCount(int_t wRVA, int wCount, QList<Instruction_t>* | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void Disassembly::prepareDataRange(int_t startRva, int_t endRva, QList<Instruction_t>* instBuffer) | void Disassembly::prepareDataRange(dsint startRva, dsint endRva, QList<Instruction_t>* instBuffer) | ||||||
| { | { | ||||||
|     if(startRva == endRva) |     if(startRva == endRva) | ||||||
|         prepareDataCount(startRva, 1, instBuffer); |         prepareDataCount(startRva, 1, instBuffer); | ||||||
|     else |     else | ||||||
|     { |     { | ||||||
|         int wCount = 0; |         int wCount = 0; | ||||||
|         int_t addr = startRva; |         dsint addr = startRva; | ||||||
|         while(addr <= endRva) |         while(addr <= endRva) | ||||||
|         { |         { | ||||||
|             addr = getNextInstructionRVA(addr, 1); |             addr = getNextInstructionRVA(addr, 1); | ||||||
|  | @ -1192,10 +1192,10 @@ void Disassembly::prepareDataRange(int_t startRva, int_t endRva, QList<Instructi | ||||||
| 
 | 
 | ||||||
| void Disassembly::prepareData() | void Disassembly::prepareData() | ||||||
| { | { | ||||||
|     int_t wViewableRowsCount = getViewableRowsCount(); |     dsint wViewableRowsCount = getViewableRowsCount(); | ||||||
| 
 | 
 | ||||||
|     int_t wAddrPrev = getTableOffset(); |     dsint wAddrPrev = getTableOffset(); | ||||||
|     int_t wAddr = wAddrPrev; |     dsint wAddr = wAddrPrev; | ||||||
| 
 | 
 | ||||||
|     int wCount = 0; |     int wCount = 0; | ||||||
| 
 | 
 | ||||||
|  | @ -1227,19 +1227,19 @@ void Disassembly::reloadData() | ||||||
| /************************************************************************************
 | /************************************************************************************
 | ||||||
|                         Public Methods |                         Public Methods | ||||||
| ************************************************************************************/ | ************************************************************************************/ | ||||||
| uint_t Disassembly::rvaToVa(int_t rva) | duint Disassembly::rvaToVa(dsint rva) | ||||||
| { | { | ||||||
|     return mMemPage->va(rva); |     return mMemPage->va(rva); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void Disassembly::disassembleAt(int_t parVA, int_t parCIP, bool history, int_t newTableOffset) | void Disassembly::disassembleAt(dsint parVA, dsint parCIP, bool history, dsint newTableOffset) | ||||||
| { | { | ||||||
|     int_t wBase = DbgMemFindBaseAddr(parVA, 0); |     dsint wBase = DbgMemFindBaseAddr(parVA, 0); | ||||||
|     int_t wSize = DbgMemGetPageSize(wBase); |     dsint wSize = DbgMemGetPageSize(wBase); | ||||||
|     if(!wBase || !wSize) |     if(!wBase || !wSize) | ||||||
|         return; |         return; | ||||||
|     int_t wRVA = parVA - wBase; |     dsint wRVA = parVA - wBase; | ||||||
|     int_t wCipRva = parCIP - wBase; |     dsint wCipRva = parCIP - wBase; | ||||||
| 
 | 
 | ||||||
|     HistoryData_t newHistory; |     HistoryData_t newHistory; | ||||||
| 
 | 
 | ||||||
|  | @ -1253,8 +1253,8 @@ void Disassembly::disassembleAt(int_t parVA, int_t parCIP, bool history, int_t n | ||||||
|         //NOTE: mCurrentVa always points to the last entry of the list
 |         //NOTE: mCurrentVa always points to the last entry of the list
 | ||||||
| 
 | 
 | ||||||
|         //add the currently selected address to the history
 |         //add the currently selected address to the history
 | ||||||
|         int_t selectionVA = rvaToVa(getInitialSelection()); //currently selected VA
 |         dsint selectionVA = rvaToVa(getInitialSelection()); //currently selected VA
 | ||||||
|         int_t selectionTableOffset = getTableOffset(); |         dsint selectionTableOffset = getTableOffset(); | ||||||
|         if(selectionVA && mVaHistory.size() && mVaHistory.last().va != selectionVA) //do not have 2x the same va in a row
 |         if(selectionVA && mVaHistory.size() && mVaHistory.last().va != selectionVA) //do not have 2x the same va in a row
 | ||||||
|         { |         { | ||||||
|             if(mVaHistory.size() >= 1024) //max 1024 in the history
 |             if(mVaHistory.size() >= 1024) //max 1024 in the history
 | ||||||
|  | @ -1278,7 +1278,7 @@ void Disassembly::disassembleAt(int_t parVA, int_t parCIP, bool history, int_t n | ||||||
|     setRowCount(wSize); |     setRowCount(wSize); | ||||||
| 
 | 
 | ||||||
|     setSingleSelection(wRVA);               // Selects disassembled instruction
 |     setSingleSelection(wRVA);               // Selects disassembled instruction
 | ||||||
|     int_t wInstrSize = getInstructionRVA(wRVA, 1) - wRVA - 1; |     dsint wInstrSize = getInstructionRVA(wRVA, 1) - wRVA - 1; | ||||||
|     expandSelectionUpTo(wRVA + wInstrSize); |     expandSelectionUpTo(wRVA + wInstrSize); | ||||||
| 
 | 
 | ||||||
|     //set CIP rva
 |     //set CIP rva
 | ||||||
|  | @ -1287,7 +1287,7 @@ void Disassembly::disassembleAt(int_t parVA, int_t parCIP, bool history, int_t n | ||||||
|     if(newTableOffset == -1) //nothing specified
 |     if(newTableOffset == -1) //nothing specified
 | ||||||
|     { |     { | ||||||
|         // Update table offset depending on the location of the instruction to disassemble
 |         // Update table offset depending on the location of the instruction to disassemble
 | ||||||
|         if(mInstBuffer.size() > 0 && wRVA >= (int_t)mInstBuffer.first().rva && wRVA < (int_t)mInstBuffer.last().rva) |         if(mInstBuffer.size() > 0 && wRVA >= (dsint)mInstBuffer.first().rva && wRVA < (dsint)mInstBuffer.last().rva) | ||||||
|         { |         { | ||||||
|             int wI; |             int wI; | ||||||
|             bool wIsAligned = false; |             bool wIsAligned = false; | ||||||
|  | @ -1311,7 +1311,7 @@ void Disassembly::disassembleAt(int_t parVA, int_t parCIP, bool history, int_t n | ||||||
|                 setTableOffset(wRVA); |                 setTableOffset(wRVA); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         else if(mInstBuffer.size() > 0 && wRVA == (int_t)mInstBuffer.last().rva) |         else if(mInstBuffer.size() > 0 && wRVA == (dsint)mInstBuffer.last().rva) | ||||||
|         { |         { | ||||||
|             setTableOffset(mInstBuffer.first().rva + mInstBuffer.first().length); |             setTableOffset(mInstBuffer.first().rva + mInstBuffer.first().length); | ||||||
|         } |         } | ||||||
|  | @ -1365,13 +1365,13 @@ QList<Instruction_t>* Disassembly::instructionsBuffer() | ||||||
|     return &mInstBuffer; |     return &mInstBuffer; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| const int_t Disassembly::currentEIP() const | const dsint Disassembly::currentEIP() const | ||||||
| { | { | ||||||
|     return mCipRva; |     return mCipRva; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| void Disassembly::disassembleAt(int_t parVA, int_t parCIP) | void Disassembly::disassembleAt(dsint parVA, dsint parCIP) | ||||||
| { | { | ||||||
|     disassembleAt(parVA, parCIP, true, -1); |     disassembleAt(parVA, parCIP, true, -1); | ||||||
| } | } | ||||||
|  | @ -1407,12 +1407,12 @@ void Disassembly::debugStateChangedSlot(DBGSTATE state) | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| const int_t Disassembly::getBase() const | const dsint Disassembly::getBase() const | ||||||
| { | { | ||||||
|     return mMemPage->getBase(); |     return mMemPage->getBase(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| int_t Disassembly::getSize() | dsint Disassembly::getSize() | ||||||
| { | { | ||||||
|     return mMemPage->getSize(); |     return mMemPage->getSize(); | ||||||
| } | } | ||||||
|  | @ -1455,12 +1455,12 @@ bool Disassembly::historyHasNext() | ||||||
|     return true; |     return true; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| QString Disassembly::getAddrText(int_t cur_addr, char label[MAX_LABEL_SIZE]) | QString Disassembly::getAddrText(dsint cur_addr, char label[MAX_LABEL_SIZE]) | ||||||
| { | { | ||||||
|     QString addrText = ""; |     QString addrText = ""; | ||||||
|     if(mRvaDisplayEnabled) //RVA display
 |     if(mRvaDisplayEnabled) //RVA display
 | ||||||
|     { |     { | ||||||
|         int_t rva = cur_addr - mRvaDisplayBase; |         dsint rva = cur_addr - mRvaDisplayBase; | ||||||
|         if(rva == 0) |         if(rva == 0) | ||||||
|         { |         { | ||||||
| #ifdef _WIN64 | #ifdef _WIN64 | ||||||
|  |  | ||||||
|  | @ -14,7 +14,7 @@ public: | ||||||
|     void fontsUpdated(); |     void fontsUpdated(); | ||||||
| 
 | 
 | ||||||
|     // Reimplemented Functions
 |     // Reimplemented Functions
 | ||||||
|     QString paintContent(QPainter* painter, int_t rowBase, int rowOffset, int col, int x, int y, int w, int h); |     QString paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h); | ||||||
| 
 | 
 | ||||||
|     // Mouse Management
 |     // Mouse Management
 | ||||||
|     void mouseMoveEvent(QMouseEvent* event); |     void mouseMoveEvent(QMouseEvent* event); | ||||||
|  | @ -25,10 +25,10 @@ public: | ||||||
|     void keyPressEvent(QKeyEvent* event); |     void keyPressEvent(QKeyEvent* event); | ||||||
| 
 | 
 | ||||||
|     // ScrollBar Management
 |     // ScrollBar Management
 | ||||||
|     int_t sliderMovedHook(int type, int_t value, int_t delta); |     dsint sliderMovedHook(int type, dsint value, dsint delta); | ||||||
| 
 | 
 | ||||||
|     // Jumps Graphic
 |     // Jumps Graphic
 | ||||||
|     int paintJumpsGraphic(QPainter* painter, int x, int y, int_t addr); |     int paintJumpsGraphic(QPainter* painter, int x, int y, dsint addr); | ||||||
| 
 | 
 | ||||||
|     // Function Graphic
 |     // Function Graphic
 | ||||||
| 
 | 
 | ||||||
|  | @ -45,22 +45,22 @@ public: | ||||||
|     int paintFunctionGraphic(QPainter* painter, int x, int y, Function_t funcType, bool loop); |     int paintFunctionGraphic(QPainter* painter, int x, int y, Function_t funcType, bool loop); | ||||||
| 
 | 
 | ||||||
|     // Instructions Management
 |     // Instructions Management
 | ||||||
|     int_t getPreviousInstructionRVA(int_t rva, uint_t count); |     dsint getPreviousInstructionRVA(dsint rva, duint count); | ||||||
|     int_t getNextInstructionRVA(int_t rva, uint_t count); |     dsint getNextInstructionRVA(dsint rva, duint count); | ||||||
|     int_t getInstructionRVA(int_t index, int_t count); |     dsint getInstructionRVA(dsint index, dsint count); | ||||||
|     Instruction_t DisassembleAt(int_t rva); |     Instruction_t DisassembleAt(dsint rva); | ||||||
|     Instruction_t DisassembleAt(int_t rva, int_t count); |     Instruction_t DisassembleAt(dsint rva, dsint count); | ||||||
| 
 | 
 | ||||||
|     // Selection Management
 |     // Selection Management
 | ||||||
|     void expandSelectionUpTo(int_t to); |     void expandSelectionUpTo(dsint to); | ||||||
|     void setSingleSelection(int_t index); |     void setSingleSelection(dsint index); | ||||||
|     int_t getInitialSelection(); |     dsint getInitialSelection(); | ||||||
|     int_t getSelectionSize(); |     dsint getSelectionSize(); | ||||||
|     int_t getSelectionStart(); |     dsint getSelectionStart(); | ||||||
|     int_t getSelectionEnd(); |     dsint getSelectionEnd(); | ||||||
|     void selectNext(bool expand); |     void selectNext(bool expand); | ||||||
|     void selectPrevious(bool expand); |     void selectPrevious(bool expand); | ||||||
|     bool isSelected(int_t base, int_t offset); |     bool isSelected(dsint base, dsint offset); | ||||||
|     bool isSelected(QList<Instruction_t>* buffer, int index); |     bool isSelected(QList<Instruction_t>* buffer, int index); | ||||||
| 
 | 
 | ||||||
|     // Update/Reload/Refresh/Repaint
 |     // Update/Reload/Refresh/Repaint
 | ||||||
|  | @ -68,10 +68,10 @@ public: | ||||||
|     void reloadData(); |     void reloadData(); | ||||||
| 
 | 
 | ||||||
|     // Public Methods
 |     // Public Methods
 | ||||||
|     uint_t rvaToVa(int_t rva); |     duint rvaToVa(dsint rva); | ||||||
|     void disassembleClear(); |     void disassembleClear(); | ||||||
|     const int_t getBase() const; |     const dsint getBase() const; | ||||||
|     int_t getSize(); |     dsint getSize(); | ||||||
| 
 | 
 | ||||||
|     // history management
 |     // history management
 | ||||||
|     void historyClear(); |     void historyClear(); | ||||||
|  | @ -81,22 +81,22 @@ public: | ||||||
|     bool historyHasNext(); |     bool historyHasNext(); | ||||||
| 
 | 
 | ||||||
|     //disassemble
 |     //disassemble
 | ||||||
|     void disassembleAt(int_t parVA, int_t parCIP, bool history, int_t newTableOffset); |     void disassembleAt(dsint parVA, dsint parCIP, bool history, dsint newTableOffset); | ||||||
| 
 | 
 | ||||||
|     QList<Instruction_t>* instructionsBuffer(); |     QList<Instruction_t>* instructionsBuffer(); | ||||||
|     const int_t baseAddress() const; |     const dsint baseAddress() const; | ||||||
|     const int_t currentEIP() const; |     const dsint currentEIP() const; | ||||||
| 
 | 
 | ||||||
|     QString getAddrText(int_t cur_addr, char label[MAX_LABEL_SIZE]); |     QString getAddrText(dsint cur_addr, char label[MAX_LABEL_SIZE]); | ||||||
|     void prepareDataCount(int_t wRVA, int wCount, QList<Instruction_t>* instBuffer); |     void prepareDataCount(dsint wRVA, int wCount, QList<Instruction_t>* instBuffer); | ||||||
|     void prepareDataRange(int_t startRva, int_t endRva, QList<Instruction_t>* instBuffer); |     void prepareDataRange(dsint startRva, dsint endRva, QList<Instruction_t>* instBuffer); | ||||||
| 
 | 
 | ||||||
| signals: | signals: | ||||||
|     void selectionChanged(int_t parVA); |     void selectionChanged(dsint parVA); | ||||||
|     void disassembledAt(int_t parVA, int_t parCIP, bool history, int_t newTableOffset); |     void disassembledAt(dsint parVA, dsint parCIP, bool history, dsint newTableOffset); | ||||||
| 
 | 
 | ||||||
| public slots: | public slots: | ||||||
|     void disassembleAt(int_t parVA, int_t parCIP); |     void disassembleAt(dsint parVA, dsint parCIP); | ||||||
|     void debugStateChangedSlot(DBGSTATE state); |     void debugStateChangedSlot(DBGSTATE state); | ||||||
| 
 | 
 | ||||||
| private: | private: | ||||||
|  | @ -105,9 +105,9 @@ private: | ||||||
| 
 | 
 | ||||||
|     typedef struct _SelectionData_t |     typedef struct _SelectionData_t | ||||||
|     { |     { | ||||||
|         int_t firstSelectedIndex; |         dsint firstSelectedIndex; | ||||||
|         int_t fromIndex; |         dsint fromIndex; | ||||||
|         int_t toIndex; |         dsint toIndex; | ||||||
|     } SelectionData_t; |     } SelectionData_t; | ||||||
| 
 | 
 | ||||||
|     QBeaEngine* mDisasm; |     QBeaEngine* mDisasm; | ||||||
|  | @ -119,14 +119,14 @@ private: | ||||||
| 
 | 
 | ||||||
|     GuiState_t mGuiState; |     GuiState_t mGuiState; | ||||||
| 
 | 
 | ||||||
|     int_t mCipRva; |     dsint mCipRva; | ||||||
| 
 | 
 | ||||||
|     QList<Instruction_t> mInstBuffer; |     QList<Instruction_t> mInstBuffer; | ||||||
| 
 | 
 | ||||||
|     typedef struct _HistoryData_t |     typedef struct _HistoryData_t | ||||||
|     { |     { | ||||||
|         int_t va; |         dsint va; | ||||||
|         int_t tableOffset; |         dsint tableOffset; | ||||||
|     } HistoryData_t; |     } HistoryData_t; | ||||||
| 
 | 
 | ||||||
|     QList<HistoryData_t> mVaHistory; |     QList<HistoryData_t> mVaHistory; | ||||||
|  | @ -135,8 +135,8 @@ private: | ||||||
| 
 | 
 | ||||||
| protected: | protected: | ||||||
|     bool mRvaDisplayEnabled; |     bool mRvaDisplayEnabled; | ||||||
|     uint_t mRvaDisplayBase; |     duint mRvaDisplayBase; | ||||||
|     int_t mRvaDisplayPageBase; |     dsint mRvaDisplayPageBase; | ||||||
|     bool mHighlightingMode; |     bool mHighlightingMode; | ||||||
|     MemoryPage* mMemPage; |     MemoryPage* mMemPage; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | @ -43,18 +43,18 @@ void HexDump::fontsUpdated() | ||||||
|     setFont(ConfigFont("HexDump")); |     setFont(ConfigFont("HexDump")); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void HexDump::printDumpAt(int_t parVA, bool select, bool repaint) | void HexDump::printDumpAt(dsint parVA, bool select, bool repaint) | ||||||
| { | { | ||||||
|     int_t wBase = DbgMemFindBaseAddr(parVA, 0); //get memory base
 |     dsint wBase = DbgMemFindBaseAddr(parVA, 0); //get memory base
 | ||||||
|     int_t wSize = DbgMemGetPageSize(wBase); //get page size
 |     dsint wSize = DbgMemGetPageSize(wBase); //get page size
 | ||||||
|     if(!wBase || !wSize) |     if(!wBase || !wSize) | ||||||
|         return; |         return; | ||||||
|     int_t wRVA = parVA - wBase; //calculate rva
 |     dsint wRVA = parVA - wBase; //calculate rva
 | ||||||
|     int wBytePerRowCount = getBytePerRowCount(); //get the number of bytes per row
 |     int wBytePerRowCount = getBytePerRowCount(); //get the number of bytes per row
 | ||||||
|     int_t wRowCount; |     dsint wRowCount; | ||||||
| 
 | 
 | ||||||
|     // Byte offset used to be aligned on the given RVA
 |     // Byte offset used to be aligned on the given RVA
 | ||||||
|     mByteOffset = (int)((int_t)wRVA % (int_t)wBytePerRowCount); |     mByteOffset = (int)((dsint)wRVA % (dsint)wBytePerRowCount); | ||||||
|     mByteOffset = mByteOffset > 0 ? wBytePerRowCount - mByteOffset : 0; |     mByteOffset = mByteOffset > 0 ? wBytePerRowCount - mByteOffset : 0; | ||||||
| 
 | 
 | ||||||
|     // Compute row count
 |     // Compute row count
 | ||||||
|  | @ -75,7 +75,7 @@ void HexDump::printDumpAt(int_t parVA, bool select, bool repaint) | ||||||
|     if(select) |     if(select) | ||||||
|     { |     { | ||||||
|         setSingleSelection(wRVA); |         setSingleSelection(wRVA); | ||||||
|         int_t wEndingAddress = wRVA + getSizeOf(mDescriptor.at(0).data.itemSize) - 1; |         dsint wEndingAddress = wRVA + getSizeOf(mDescriptor.at(0).data.itemSize) - 1; | ||||||
|         expandSelectionUpTo(wEndingAddress); |         expandSelectionUpTo(wEndingAddress); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | @ -83,12 +83,12 @@ void HexDump::printDumpAt(int_t parVA, bool select, bool repaint) | ||||||
|         reloadData(); |         reloadData(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void HexDump::printDumpAt(int_t parVA) | void HexDump::printDumpAt(dsint parVA) | ||||||
| { | { | ||||||
|     printDumpAt(parVA, true); |     printDumpAt(parVA, true); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| uint_t HexDump::rvaToVa(int_t rva) | duint HexDump::rvaToVa(dsint rva) | ||||||
| { | { | ||||||
|     return mMemPage->va(rva); |     return mMemPage->va(rva); | ||||||
| } | } | ||||||
|  | @ -118,11 +118,11 @@ void HexDump::mouseMoveEvent(QMouseEvent* event) | ||||||
| 
 | 
 | ||||||
|                 if(wColIndex > 0) // No selection for first column (addresses)
 |                 if(wColIndex > 0) // No selection for first column (addresses)
 | ||||||
|                 { |                 { | ||||||
|                     int_t wStartingAddress = getItemStartingAddress(x, y); |                     dsint wStartingAddress = getItemStartingAddress(x, y); | ||||||
|                     int_t dataSize = getSizeOf(mDescriptor.at(wColIndex - 1).data.itemSize) - 1; |                     dsint dataSize = getSizeOf(mDescriptor.at(wColIndex - 1).data.itemSize) - 1; | ||||||
|                     int_t wEndingAddress = wStartingAddress + dataSize; |                     dsint wEndingAddress = wStartingAddress + dataSize; | ||||||
| 
 | 
 | ||||||
|                     if(wEndingAddress < (int_t)mMemPage->getSize()) |                     if(wEndingAddress < (dsint)mMemPage->getSize()) | ||||||
|                     { |                     { | ||||||
|                         if(wStartingAddress < getInitialSelection()) |                         if(wStartingAddress < getInitialSelection()) | ||||||
|                         { |                         { | ||||||
|  | @ -155,7 +155,7 @@ void HexDump::mousePressEvent(QMouseEvent* event) | ||||||
|         if(!DbgIsDebugging()) |         if(!DbgIsDebugging()) | ||||||
|             return; |             return; | ||||||
|         MessageBeep(MB_OK); |         MessageBeep(MB_OK); | ||||||
|         QString addrText = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         QString addrText = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|         Bridge::CopyToClipboard(addrText); |         Bridge::CopyToClipboard(addrText); | ||||||
|         return; |         return; | ||||||
|     } |     } | ||||||
|  | @ -182,11 +182,11 @@ void HexDump::mousePressEvent(QMouseEvent* event) | ||||||
| 
 | 
 | ||||||
|                 if(wColIndex > 0 && mDescriptor.at(wColIndex - 1).isData == true) // No selection for first column (addresses) and no data columns
 |                 if(wColIndex > 0 && mDescriptor.at(wColIndex - 1).isData == true) // No selection for first column (addresses) and no data columns
 | ||||||
|                 { |                 { | ||||||
|                     int_t wStartingAddress = getItemStartingAddress(x, y); |                     dsint wStartingAddress = getItemStartingAddress(x, y); | ||||||
|                     int_t dataSize = getSizeOf(mDescriptor.at(wColIndex - 1).data.itemSize) - 1; |                     dsint dataSize = getSizeOf(mDescriptor.at(wColIndex - 1).data.itemSize) - 1; | ||||||
|                     int_t wEndingAddress = wStartingAddress + dataSize; |                     dsint wEndingAddress = wStartingAddress + dataSize; | ||||||
| 
 | 
 | ||||||
|                     if(wEndingAddress < (int_t)mMemPage->getSize()) |                     if(wEndingAddress < (dsint)mMemPage->getSize()) | ||||||
|                     { |                     { | ||||||
|                         bool bUpdateTo = false; |                         bool bUpdateTo = false; | ||||||
|                         if(!(event->modifiers() & Qt::ShiftModifier)) |                         if(!(event->modifiers() & Qt::ShiftModifier)) | ||||||
|  | @ -238,7 +238,7 @@ void HexDump::mouseReleaseEvent(QMouseEvent* event) | ||||||
|         AbstractTableView::mouseReleaseEvent(event); |         AbstractTableView::mouseReleaseEvent(event); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| QString HexDump::paintContent(QPainter* painter, int_t rowBase, int rowOffset, int col, int x, int y, int w, int h) | QString HexDump::paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h) | ||||||
| { | { | ||||||
|     // Reset byte offset when base address is reached
 |     // Reset byte offset when base address is reached
 | ||||||
|     if(rowBase == 0 && mByteOffset != 0) |     if(rowBase == 0 && mByteOffset != 0) | ||||||
|  | @ -246,12 +246,12 @@ QString HexDump::paintContent(QPainter* painter, int_t rowBase, int rowOffset, i | ||||||
| 
 | 
 | ||||||
|     // Compute RVA
 |     // Compute RVA
 | ||||||
|     int wBytePerRowCount = getBytePerRowCount(); |     int wBytePerRowCount = getBytePerRowCount(); | ||||||
|     int_t wRva = (rowBase + rowOffset) * wBytePerRowCount - mByteOffset; |     dsint wRva = (rowBase + rowOffset) * wBytePerRowCount - mByteOffset; | ||||||
| 
 | 
 | ||||||
|     QString wStr = ""; |     QString wStr = ""; | ||||||
|     if(col == 0)    // Addresses
 |     if(col == 0)    // Addresses
 | ||||||
|     { |     { | ||||||
|         wStr += QString("%1").arg(rvaToVa(wRva), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         wStr += QString("%1").arg(rvaToVa(wRva), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     } |     } | ||||||
|     else if(mDescriptor.at(col - 1).isData == true) //paint data
 |     else if(mDescriptor.at(col - 1).isData == true) //paint data
 | ||||||
|     { |     { | ||||||
|  | @ -267,13 +267,13 @@ QString HexDump::paintContent(QPainter* painter, int_t rowBase, int rowOffset, i | ||||||
|     return wStr; |     return wStr; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void HexDump::printSelected(QPainter* painter, int_t rowBase, int rowOffset, int col, int x, int y, int w, int h) | void HexDump::printSelected(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h) | ||||||
| { | { | ||||||
|     if((col > 0) && ((col - 1) < mDescriptor.size())) |     if((col > 0) && ((col - 1) < mDescriptor.size())) | ||||||
|     { |     { | ||||||
|         ColumnDescriptor_t curDescriptor = mDescriptor.at(col - 1); |         ColumnDescriptor_t curDescriptor = mDescriptor.at(col - 1); | ||||||
|         int wBytePerRowCount = getBytePerRowCount(); |         int wBytePerRowCount = getBytePerRowCount(); | ||||||
|         int_t wRva = (rowBase + rowOffset) * wBytePerRowCount - mByteOffset; |         dsint wRva = (rowBase + rowOffset) * wBytePerRowCount - mByteOffset; | ||||||
|         int wItemPixWidth = getItemPixelWidth(curDescriptor); |         int wItemPixWidth = getItemPixelWidth(curDescriptor); | ||||||
|         int wCharWidth = getCharWidth(); |         int wCharWidth = getCharWidth(); | ||||||
|         if(wItemPixWidth == wCharWidth) |         if(wItemPixWidth == wCharWidth) | ||||||
|  | @ -302,7 +302,7 @@ void HexDump::printSelected(QPainter* painter, int_t rowBase, int rowOffset, int | ||||||
| /************************************************************************************
 | /************************************************************************************
 | ||||||
|                                 Selection Management |                                 Selection Management | ||||||
| ************************************************************************************/ | ************************************************************************************/ | ||||||
| void HexDump::expandSelectionUpTo(int_t rva) | void HexDump::expandSelectionUpTo(dsint rva) | ||||||
| { | { | ||||||
|     if(rva < mSelection.firstSelectedIndex) |     if(rva < mSelection.firstSelectedIndex) | ||||||
|     { |     { | ||||||
|  | @ -322,7 +322,7 @@ void HexDump::expandSelectionUpTo(int_t rva) | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void HexDump::setSingleSelection(int_t rva) | void HexDump::setSingleSelection(dsint rva) | ||||||
| { | { | ||||||
|     mSelection.firstSelectedIndex = rva; |     mSelection.firstSelectedIndex = rva; | ||||||
|     mSelection.fromIndex = rva; |     mSelection.fromIndex = rva; | ||||||
|  | @ -330,22 +330,22 @@ void HexDump::setSingleSelection(int_t rva) | ||||||
|     emit selectionUpdated(); |     emit selectionUpdated(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| int_t HexDump::getInitialSelection() | dsint HexDump::getInitialSelection() | ||||||
| { | { | ||||||
|     return mSelection.firstSelectedIndex; |     return mSelection.firstSelectedIndex; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| int_t HexDump::getSelectionStart() | dsint HexDump::getSelectionStart() | ||||||
| { | { | ||||||
|     return mSelection.fromIndex; |     return mSelection.fromIndex; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| int_t HexDump::getSelectionEnd() | dsint HexDump::getSelectionEnd() | ||||||
| { | { | ||||||
|     return mSelection.toIndex; |     return mSelection.toIndex; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool HexDump::isSelected(int_t rva) | bool HexDump::isSelected(dsint rva) | ||||||
| { | { | ||||||
|     if(rva >= mSelection.fromIndex && rva <= mSelection.toIndex) |     if(rva >= mSelection.fromIndex && rva <= mSelection.toIndex) | ||||||
|         return true; |         return true; | ||||||
|  | @ -353,7 +353,7 @@ bool HexDump::isSelected(int_t rva) | ||||||
|         return false; |         return false; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void HexDump::getString(int col, int_t rva, QList<RichTextPainter::CustomRichText_t>* richText) | void HexDump::getString(int col, dsint rva, QList<RichTextPainter::CustomRichText_t>* richText) | ||||||
| { | { | ||||||
|     int wI; |     int wI; | ||||||
|     QString wStr = ""; |     QString wStr = ""; | ||||||
|  | @ -361,7 +361,7 @@ void HexDump::getString(int col, int_t rva, QList<RichTextPainter::CustomRichTex | ||||||
|     int wByteCount = getSizeOf(mDescriptor.at(col).data.itemSize); |     int wByteCount = getSizeOf(mDescriptor.at(col).data.itemSize); | ||||||
|     int wBufferByteCount = mDescriptor.at(col).itemCount * wByteCount; |     int wBufferByteCount = mDescriptor.at(col).itemCount * wByteCount; | ||||||
| 
 | 
 | ||||||
|     wBufferByteCount = wBufferByteCount > (int_t)(mMemPage->getSize() - rva) ? mMemPage->getSize() - rva : wBufferByteCount; |     wBufferByteCount = wBufferByteCount > (dsint)(mMemPage->getSize() - rva) ? mMemPage->getSize() - rva : wBufferByteCount; | ||||||
| 
 | 
 | ||||||
|     byte_t* wData = new byte_t[wBufferByteCount]; |     byte_t* wData = new byte_t[wBufferByteCount]; | ||||||
|     //byte_t wData[mDescriptor.at(col).itemCount * wByteCount];
 |     //byte_t wData[mDescriptor.at(col).itemCount * wByteCount];
 | ||||||
|  | @ -374,19 +374,19 @@ void HexDump::getString(int col, int_t rva, QList<RichTextPainter::CustomRichTex | ||||||
| 
 | 
 | ||||||
|     QColor highlightColor = ConfigColor("HexDumpModifiedBytesColor"); |     QColor highlightColor = ConfigColor("HexDumpModifiedBytesColor"); | ||||||
| 
 | 
 | ||||||
|     for(wI = 0; wI < mDescriptor.at(col).itemCount && (rva + wI) < (int_t)mMemPage->getSize(); wI++) |     for(wI = 0; wI < mDescriptor.at(col).itemCount && (rva + wI) < (dsint)mMemPage->getSize(); wI++) | ||||||
|     { |     { | ||||||
|         int maxLen = getStringMaxLength(mDescriptor.at(col).data); |         int maxLen = getStringMaxLength(mDescriptor.at(col).data); | ||||||
|         QString append = " "; |         QString append = " "; | ||||||
|         if(!maxLen) |         if(!maxLen) | ||||||
|             append = ""; |             append = ""; | ||||||
|         if((rva + wI + wByteCount - 1) < (int_t)mMemPage->getSize()) |         if((rva + wI + wByteCount - 1) < (dsint)mMemPage->getSize()) | ||||||
|             wStr = toString(mDescriptor.at(col).data, (void*)(wData + wI * wByteCount)).rightJustified(maxLen, ' ') + append; |             wStr = toString(mDescriptor.at(col).data, (void*)(wData + wI * wByteCount)).rightJustified(maxLen, ' ') + append; | ||||||
|         else |         else | ||||||
|             wStr = QString("?").rightJustified(maxLen, ' ') + append; |             wStr = QString("?").rightJustified(maxLen, ' ') + append; | ||||||
|         curData.text = wStr; |         curData.text = wStr; | ||||||
|         int_t start = rvaToVa(rva + wI * wByteCount); |         dsint start = rvaToVa(rva + wI * wByteCount); | ||||||
|         int_t end = start + wByteCount - 1; |         dsint end = start + wByteCount - 1; | ||||||
|         curData.textColor = DbgFunctions()->PatchInRange(start, end) ? highlightColor : textColor; |         curData.textColor = DbgFunctions()->PatchInRange(start, end) ? highlightColor : textColor; | ||||||
|         richText->push_back(curData); |         richText->push_back(curData); | ||||||
|     } |     } | ||||||
|  | @ -937,12 +937,12 @@ int HexDump::getItemIndexFromX(int x) | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| int_t HexDump::getItemStartingAddress(int x, int y) | dsint HexDump::getItemStartingAddress(int x, int y) | ||||||
| { | { | ||||||
|     int wRowOffset = getIndexOffsetFromY(transY(y)); |     int wRowOffset = getIndexOffsetFromY(transY(y)); | ||||||
|     int wItemIndex = getItemIndexFromX(x); |     int wItemIndex = getItemIndexFromX(x); | ||||||
|     int wColIndex = getColumnIndexFromX(x); |     int wColIndex = getColumnIndexFromX(x); | ||||||
|     int_t wStartingAddress = 0; |     dsint wStartingAddress = 0; | ||||||
| 
 | 
 | ||||||
|     if(wColIndex > 0) |     if(wColIndex > 0) | ||||||
|     { |     { | ||||||
|  | @ -978,7 +978,7 @@ void HexDump::appendResetDescriptor(int width, QString title, bool clickable, Co | ||||||
|     mAllowPainting = false; |     mAllowPainting = false; | ||||||
|     if(mDescriptor.size()) |     if(mDescriptor.size()) | ||||||
|     { |     { | ||||||
|         int_t wRVA = getTableOffset() * getBytePerRowCount() - mByteOffset; |         dsint wRVA = getTableOffset() * getBytePerRowCount() - mByteOffset; | ||||||
|         clearDescriptors(); |         clearDescriptors(); | ||||||
|         appendDescriptor(width, title, clickable, descriptor); |         appendDescriptor(width, title, clickable, descriptor); | ||||||
|         printDumpAt(rvaToVa(wRVA), true, false); |         printDumpAt(rvaToVa(wRVA), true, false); | ||||||
|  | @ -993,7 +993,7 @@ void HexDump::clearDescriptors() | ||||||
|     deleteAllColumns(); |     deleteAllColumns(); | ||||||
|     mDescriptor.clear(); |     mDescriptor.clear(); | ||||||
|     int charwidth = getCharWidth(); |     int charwidth = getCharWidth(); | ||||||
|     addColumnAt(8 + charwidth * 2 * sizeof(uint_t), "Address", false); //address
 |     addColumnAt(8 + charwidth * 2 * sizeof(duint), "Address", false); //address
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void HexDump::debugStateChanged(DBGSTATE state) | void HexDump::debugStateChanged(DBGSTATE state) | ||||||
|  |  | ||||||
|  | @ -85,20 +85,20 @@ public: | ||||||
|     void mousePressEvent(QMouseEvent* event); |     void mousePressEvent(QMouseEvent* event); | ||||||
|     void mouseReleaseEvent(QMouseEvent* event); |     void mouseReleaseEvent(QMouseEvent* event); | ||||||
| 
 | 
 | ||||||
|     QString paintContent(QPainter* painter, int_t rowBase, int rowOffset, int col, int x, int y, int w, int h); |     QString paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h); | ||||||
|     void paintGraphicDump(QPainter* painter, int x, int y, int addr); |     void paintGraphicDump(QPainter* painter, int x, int y, int addr); | ||||||
| 
 | 
 | ||||||
|     void printSelected(QPainter* painter, int_t rowBase, int rowOffset, int col, int x, int y, int w, int h); |     void printSelected(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h); | ||||||
| 
 | 
 | ||||||
|     // Selection Management
 |     // Selection Management
 | ||||||
|     void expandSelectionUpTo(int_t rva); |     void expandSelectionUpTo(dsint rva); | ||||||
|     void setSingleSelection(int_t rva); |     void setSingleSelection(dsint rva); | ||||||
|     int_t getInitialSelection(); |     dsint getInitialSelection(); | ||||||
|     int_t getSelectionStart(); |     dsint getSelectionStart(); | ||||||
|     int_t getSelectionEnd(); |     dsint getSelectionEnd(); | ||||||
|     bool isSelected(int_t rva); |     bool isSelected(dsint rva); | ||||||
| 
 | 
 | ||||||
|     void getString(int col, int_t rva, QList<RichTextPainter::CustomRichText_t>* richText); |     void getString(int col, dsint rva, QList<RichTextPainter::CustomRichText_t>* richText); | ||||||
|     int getSizeOf(DataSize_e size); |     int getSizeOf(DataSize_e size); | ||||||
| 
 | 
 | ||||||
|     QString toString(DataDescriptor_t desc, void* data); |     QString toString(DataDescriptor_t desc, void* data); | ||||||
|  | @ -118,7 +118,7 @@ public: | ||||||
|     int twordStringMaxLength(TwordViewMode_e mode); |     int twordStringMaxLength(TwordViewMode_e mode); | ||||||
| 
 | 
 | ||||||
|     int getItemIndexFromX(int x); |     int getItemIndexFromX(int x); | ||||||
|     int_t getItemStartingAddress(int x, int y); |     dsint getItemStartingAddress(int x, int y); | ||||||
| 
 | 
 | ||||||
|     int getBytePerRowCount(); |     int getBytePerRowCount(); | ||||||
|     int getItemPixelWidth(ColumnDescriptor_t desc); |     int getItemPixelWidth(ColumnDescriptor_t desc); | ||||||
|  | @ -128,14 +128,14 @@ public: | ||||||
|     void appendResetDescriptor(int width, QString title, bool clickable, ColumnDescriptor_t descriptor); |     void appendResetDescriptor(int width, QString title, bool clickable, ColumnDescriptor_t descriptor); | ||||||
|     void clearDescriptors(); |     void clearDescriptors(); | ||||||
| 
 | 
 | ||||||
|     void printDumpAt(int_t parVA, bool select, bool repaint = true); |     void printDumpAt(dsint parVA, bool select, bool repaint = true); | ||||||
|     uint_t rvaToVa(int_t rva); |     duint rvaToVa(dsint rva); | ||||||
| 
 | 
 | ||||||
| signals: | signals: | ||||||
|     void selectionUpdated(); |     void selectionUpdated(); | ||||||
| 
 | 
 | ||||||
| public slots: | public slots: | ||||||
|     void printDumpAt(int_t parVA); |     void printDumpAt(dsint parVA); | ||||||
|     void debugStateChanged(DBGSTATE state); |     void debugStateChanged(DBGSTATE state); | ||||||
| 
 | 
 | ||||||
| private: | private: | ||||||
|  | @ -143,9 +143,9 @@ private: | ||||||
| 
 | 
 | ||||||
|     typedef struct _RowDescriptor_t |     typedef struct _RowDescriptor_t | ||||||
|     { |     { | ||||||
|         int_t firstSelectedIndex; |         dsint firstSelectedIndex; | ||||||
|         int_t fromIndex; |         dsint fromIndex; | ||||||
|         int_t toIndex; |         dsint toIndex; | ||||||
|     } SelectionData_t; |     } SelectionData_t; | ||||||
| 
 | 
 | ||||||
|     SelectionData_t mSelection; |     SelectionData_t mSelection; | ||||||
|  | @ -158,8 +158,8 @@ protected: | ||||||
|     QList<ColumnDescriptor_t> mDescriptor; |     QList<ColumnDescriptor_t> mDescriptor; | ||||||
|     int mForceColumn; |     int mForceColumn; | ||||||
|     bool mRvaDisplayEnabled; |     bool mRvaDisplayEnabled; | ||||||
|     uint_t mRvaDisplayBase; |     duint mRvaDisplayBase; | ||||||
|     int_t mRvaDisplayPageBase; |     dsint mRvaDisplayPageBase; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| #endif // _HEXDUMP_H
 | #endif // _HEXDUMP_H
 | ||||||
|  |  | ||||||
|  | @ -32,7 +32,7 @@ ReferenceView::ReferenceView() | ||||||
| 
 | 
 | ||||||
|     // Setup signals
 |     // Setup signals
 | ||||||
|     connect(Bridge::getBridge(), SIGNAL(referenceAddColumnAt(int, QString)), this, SLOT(addColumnAt(int, QString))); |     connect(Bridge::getBridge(), SIGNAL(referenceAddColumnAt(int, QString)), this, SLOT(addColumnAt(int, QString))); | ||||||
|     connect(Bridge::getBridge(), SIGNAL(referenceSetRowCount(int_t)), this, SLOT(setRowCount(int_t))); |     connect(Bridge::getBridge(), SIGNAL(referenceSetRowCount(dsint)), this, SLOT(setRowCount(dsint))); | ||||||
|     connect(Bridge::getBridge(), SIGNAL(referenceSetCellContent(int, int, QString)), this, SLOT(setCellContent(int, int, QString))); |     connect(Bridge::getBridge(), SIGNAL(referenceSetCellContent(int, int, QString)), this, SLOT(setCellContent(int, int, QString))); | ||||||
|     connect(Bridge::getBridge(), SIGNAL(referenceReloadData()), this, SLOT(reloadData())); |     connect(Bridge::getBridge(), SIGNAL(referenceReloadData()), this, SLOT(reloadData())); | ||||||
|     connect(Bridge::getBridge(), SIGNAL(referenceSetSingleSelection(int, bool)), this, SLOT(setSingleSelection(int, bool))); |     connect(Bridge::getBridge(), SIGNAL(referenceSetSingleSelection(int, bool)), this, SLOT(setSingleSelection(int, bool))); | ||||||
|  | @ -76,7 +76,7 @@ void ReferenceView::setupContextMenu() | ||||||
| void ReferenceView::disconnectBridge() | void ReferenceView::disconnectBridge() | ||||||
| { | { | ||||||
|     disconnect(Bridge::getBridge(), SIGNAL(referenceAddColumnAt(int, QString)), this, SLOT(addColumnAt(int, QString))); |     disconnect(Bridge::getBridge(), SIGNAL(referenceAddColumnAt(int, QString)), this, SLOT(addColumnAt(int, QString))); | ||||||
|     disconnect(Bridge::getBridge(), SIGNAL(referenceSetRowCount(int_t)), this, SLOT(setRowCount(int_t))); |     disconnect(Bridge::getBridge(), SIGNAL(referenceSetRowCount(dsint)), this, SLOT(setRowCount(dsint))); | ||||||
|     disconnect(Bridge::getBridge(), SIGNAL(referenceSetCellContent(int, int, QString)), this, SLOT(setCellContent(int, int, QString))); |     disconnect(Bridge::getBridge(), SIGNAL(referenceSetCellContent(int, int, QString)), this, SLOT(setCellContent(int, int, QString))); | ||||||
|     disconnect(Bridge::getBridge(), SIGNAL(referenceReloadData()), this, SLOT(reloadData())); |     disconnect(Bridge::getBridge(), SIGNAL(referenceReloadData()), this, SLOT(reloadData())); | ||||||
|     disconnect(Bridge::getBridge(), SIGNAL(referenceSetSingleSelection(int, bool)), this, SLOT(setSingleSelection(int, bool))); |     disconnect(Bridge::getBridge(), SIGNAL(referenceSetSingleSelection(int, bool)), this, SLOT(setSingleSelection(int, bool))); | ||||||
|  | @ -107,7 +107,7 @@ void ReferenceView::addColumnAt(int width, QString title) | ||||||
|     mSearchList->addColumnAt(width, title, true); |     mSearchList->addColumnAt(width, title, true); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void ReferenceView::setRowCount(int_t count) | void ReferenceView::setRowCount(dsint count) | ||||||
| { | { | ||||||
|     emit mCountLabel->setText(QString("%1").arg(count)); |     emit mCountLabel->setText(QString("%1").arg(count)); | ||||||
|     mSearchBox->setText(""); |     mSearchBox->setText(""); | ||||||
|  | @ -173,7 +173,7 @@ void ReferenceView::followDumpAddress() | ||||||
| 
 | 
 | ||||||
| void ReferenceView::followApiAddress() | void ReferenceView::followApiAddress() | ||||||
| { | { | ||||||
|     int_t apiValue = apiAddressFromString(mCurList->getCellContent(mCurList->getInitialSelection(), 1)); |     dsint apiValue = apiAddressFromString(mCurList->getCellContent(mCurList->getInitialSelection(), 1)); | ||||||
|     DbgCmdExecDirect(QString("disasm " + QString().sprintf("%p", apiValue)).toUtf8().constData()); |     DbgCmdExecDirect(QString("disasm " + QString().sprintf("%p", apiValue)).toUtf8().constData()); | ||||||
|     emit showCpu(); |     emit showCpu(); | ||||||
| } | } | ||||||
|  | @ -205,11 +205,11 @@ void ReferenceView::toggleBreakpoint() | ||||||
| 
 | 
 | ||||||
|     if((wBpType & bp_normal) == bp_normal) |     if((wBpType & bp_normal) == bp_normal) | ||||||
|     { |     { | ||||||
|         wCmd = "bc " + QString("%1").arg(wVA, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         wCmd = "bc " + QString("%1").arg(wVA, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     } |     } | ||||||
|     else |     else | ||||||
|     { |     { | ||||||
|         wCmd = "bp " + QString("%1").arg(wVA, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         wCmd = "bp " + QString("%1").arg(wVA, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     DbgCmdExec(wCmd.toUtf8().constData()); |     DbgCmdExec(wCmd.toUtf8().constData()); | ||||||
|  | @ -245,7 +245,7 @@ void ReferenceView::toggleBookmark() | ||||||
|     GuiUpdateAllViews(); |     GuiUpdateAllViews(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| int_t ReferenceView::apiAddressFromString(const QString & s) | dsint ReferenceView::apiAddressFromString(const QString & s) | ||||||
| { | { | ||||||
|     QRegExp regEx("call.+<(.+)>"); |     QRegExp regEx("call.+<(.+)>"); | ||||||
|     regEx.indexIn(s); |     regEx.indexIn(s); | ||||||
|  |  | ||||||
|  | @ -16,7 +16,7 @@ public: | ||||||
| 
 | 
 | ||||||
| private slots: | private slots: | ||||||
|     void addColumnAt(int width, QString title); |     void addColumnAt(int width, QString title); | ||||||
|     void setRowCount(int_t count); |     void setRowCount(dsint count); | ||||||
|     void setCellContent(int r, int c, QString s); |     void setCellContent(int r, int c, QString s); | ||||||
|     void reloadData(); |     void reloadData(); | ||||||
|     void setSingleSelection(int index, bool scroll); |     void setSingleSelection(int index, bool scroll); | ||||||
|  | @ -43,7 +43,7 @@ private: | ||||||
|     bool mFollowDumpDefault; |     bool mFollowDumpDefault; | ||||||
|     QLabel* mCountLabel; |     QLabel* mCountLabel; | ||||||
| 
 | 
 | ||||||
|     int_t apiAddressFromString(const QString & s); |     dsint apiAddressFromString(const QString & s); | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| #endif // REFERENCEVIEW_H
 | #endif // REFERENCEVIEW_H
 | ||||||
|  |  | ||||||
|  | @ -7,7 +7,7 @@ SearchListViewTable::SearchListViewTable(StdTable* parent) : StdTable(parent) | ||||||
|     highlightText = ""; |     highlightText = ""; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| QString SearchListViewTable::paintContent(QPainter* painter, int_t rowBase, int rowOffset, int col, int x, int y, int w, int h) | QString SearchListViewTable::paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h) | ||||||
| { | { | ||||||
|     bool isaddr = true; |     bool isaddr = true; | ||||||
|     QString text = StdTable::paintContent(painter, rowBase, rowOffset, col, x, y, w, h); |     QString text = StdTable::paintContent(painter, rowBase, rowOffset, col, x, y, w, h); | ||||||
|  | @ -16,7 +16,7 @@ QString SearchListViewTable::paintContent(QPainter* painter, int_t rowBase, int | ||||||
|     if(!getRowCount()) |     if(!getRowCount()) | ||||||
|         isaddr = false; |         isaddr = false; | ||||||
|     ULONGLONG val = 0; |     ULONGLONG val = 0; | ||||||
|     uint_t wVA; |     duint wVA; | ||||||
|     if(sscanf_s(text.toUtf8().constData(), "%llX", &val) != 1) |     if(sscanf_s(text.toUtf8().constData(), "%llX", &val) != 1) | ||||||
|         isaddr = false; |         isaddr = false; | ||||||
|     else |     else | ||||||
|  |  | ||||||
|  | @ -11,7 +11,7 @@ public: | ||||||
|     QString highlightText; |     QString highlightText; | ||||||
| 
 | 
 | ||||||
| protected: | protected: | ||||||
|     QString paintContent(QPainter* painter, int_t rowBase, int rowOffset, int col, int x, int y, int w, int h); |     QString paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h); | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| #endif // SEARCHLISTVIEWTABLE_H
 | #endif // SEARCHLISTVIEWTABLE_H
 | ||||||
|  |  | ||||||
|  | @ -24,7 +24,7 @@ StdTable::StdTable(QWidget* parent) : AbstractTableView(parent) | ||||||
|     connect(this, SIGNAL(headerButtonPressed(int)), this, SLOT(headerButtonPressedSlot(int))); |     connect(this, SIGNAL(headerButtonPressed(int)), this, SLOT(headerButtonPressedSlot(int))); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| QString StdTable::paintContent(QPainter* painter, int_t rowBase, int rowOffset, int col, int x, int y, int w, int h) | QString StdTable::paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h) | ||||||
| { | { | ||||||
|     if(isSelected(rowBase, rowOffset) == true) |     if(isSelected(rowBase, rowOffset) == true) | ||||||
|         painter->fillRect(QRect(x, y, w, h), QBrush(selectionColor)); |         painter->fillRect(QRect(x, y, w, h), QBrush(selectionColor)); | ||||||
|  | @ -128,8 +128,8 @@ void StdTable::keyPressEvent(QKeyEvent* event) | ||||||
| 
 | 
 | ||||||
|     if(key == Qt::Key_Up || key == Qt::Key_Down) |     if(key == Qt::Key_Up || key == Qt::Key_Down) | ||||||
|     { |     { | ||||||
|         int_t wBotIndex = getTableOffset(); |         dsint wBotIndex = getTableOffset(); | ||||||
|         int_t wTopIndex = wBotIndex + getNbrOfLineToPrint() - 1; |         dsint wTopIndex = wBotIndex + getNbrOfLineToPrint() - 1; | ||||||
| 
 | 
 | ||||||
|         if(key == Qt::Key_Up) |         if(key == Qt::Key_Up) | ||||||
|             selectPrevious(); |             selectPrevious(); | ||||||
|  |  | ||||||
|  | @ -8,7 +8,7 @@ class StdTable : public AbstractTableView | ||||||
|     Q_OBJECT |     Q_OBJECT | ||||||
| public: | public: | ||||||
|     explicit StdTable(QWidget* parent = 0); |     explicit StdTable(QWidget* parent = 0); | ||||||
|     QString paintContent(QPainter* painter, int_t rowBase, int rowOffset, int col, int x, int y, int w, int h); |     QString paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h); | ||||||
|     void reloadData(); |     void reloadData(); | ||||||
| 
 | 
 | ||||||
|     void mouseMoveEvent(QMouseEvent* event); |     void mouseMoveEvent(QMouseEvent* event); | ||||||
|  |  | ||||||
|  | @ -34,7 +34,7 @@ void Bridge::CopyToClipboard(const QString & text) | ||||||
|     clipboard->setText(text); |     clipboard->setText(text); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void Bridge::setResult(int_t result) | void Bridge::setResult(dsint result) | ||||||
| { | { | ||||||
|     bridgeResult = result; |     bridgeResult = result; | ||||||
|     hasBridgeResult = true; |     hasBridgeResult = true; | ||||||
|  | @ -85,11 +85,11 @@ void* Bridge::processMessage(GUIMSG type, void* param1, void* param2) | ||||||
|     switch(type) |     switch(type) | ||||||
|     { |     { | ||||||
|     case GUI_DISASSEMBLE_AT: |     case GUI_DISASSEMBLE_AT: | ||||||
|         emit disassembleAt((int_t)param1, (int_t)param2); |         emit disassembleAt((dsint)param1, (dsint)param2); | ||||||
|         break; |         break; | ||||||
| 
 | 
 | ||||||
|     case GUI_SET_DEBUG_STATE: |     case GUI_SET_DEBUG_STATE: | ||||||
|         emit dbgStateChanged((DBGSTATE)(int_t)param1); |         emit dbgStateChanged((DBGSTATE)(dsint)param1); | ||||||
|         break; |         break; | ||||||
| 
 | 
 | ||||||
|     case GUI_ADD_MSG_TO_LOG: |     case GUI_ADD_MSG_TO_LOG: | ||||||
|  | @ -120,7 +120,7 @@ void* Bridge::processMessage(GUIMSG type, void* param1, void* param2) | ||||||
|         return winId; |         return winId; | ||||||
| 
 | 
 | ||||||
|     case GUI_DUMP_AT: |     case GUI_DUMP_AT: | ||||||
|         emit dumpAt((int_t)param1); |         emit dumpAt((dsint)param1); | ||||||
|         break; |         break; | ||||||
| 
 | 
 | ||||||
|     case GUI_SCRIPT_ADD: |     case GUI_SCRIPT_ADD: | ||||||
|  | @ -196,7 +196,7 @@ void* Bridge::processMessage(GUIMSG type, void* param1, void* param2) | ||||||
|         break; |         break; | ||||||
| 
 | 
 | ||||||
|     case GUI_REF_SETROWCOUNT: |     case GUI_REF_SETROWCOUNT: | ||||||
|         emit referenceSetRowCount((int_t)param1); |         emit referenceSetRowCount((dsint)param1); | ||||||
|         break; |         break; | ||||||
| 
 | 
 | ||||||
|     case GUI_REF_GETROWCOUNT: |     case GUI_REF_GETROWCOUNT: | ||||||
|  | @ -241,7 +241,7 @@ void* Bridge::processMessage(GUIMSG type, void* param1, void* param2) | ||||||
|     break; |     break; | ||||||
| 
 | 
 | ||||||
|     case GUI_STACK_DUMP_AT: |     case GUI_STACK_DUMP_AT: | ||||||
|         emit stackDumpAt((uint_t)param1, (uint_t)param2); |         emit stackDumpAt((duint)param1, (duint)param2); | ||||||
|         break; |         break; | ||||||
| 
 | 
 | ||||||
|     case GUI_UPDATE_DUMP_VIEW: |     case GUI_UPDATE_DUMP_VIEW: | ||||||
|  | @ -266,7 +266,7 @@ void* Bridge::processMessage(GUIMSG type, void* param1, void* param2) | ||||||
| 
 | 
 | ||||||
|     case GUI_GET_DISASSEMBLY: |     case GUI_GET_DISASSEMBLY: | ||||||
|     { |     { | ||||||
|         uint_t parVA = (uint_t)param1; |         duint parVA = (duint)param1; | ||||||
|         char* text = (char*)param2; |         char* text = (char*)param2; | ||||||
|         if(!text || !parVA || !DbgIsDebugging()) |         if(!text || !parVA || !DbgIsDebugging()) | ||||||
|             return 0; |             return 0; | ||||||
|  | @ -342,7 +342,7 @@ void* Bridge::processMessage(GUIMSG type, void* param1, void* param2) | ||||||
|         result.Wait(); |         result.Wait(); | ||||||
|         if(selection->start > selection->end) //swap start and end
 |         if(selection->start > selection->end) //swap start and end
 | ||||||
|         { |         { | ||||||
|             int_t temp = selection->end; |             dsint temp = selection->end; | ||||||
|             selection->end = selection->start; |             selection->end = selection->start; | ||||||
|             selection->start = temp; |             selection->start = temp; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  | @ -30,7 +30,7 @@ public: | ||||||
|     static void CopyToClipboard(const QString & text); |     static void CopyToClipboard(const QString & text); | ||||||
| 
 | 
 | ||||||
|     //result function
 |     //result function
 | ||||||
|     void setResult(int_t result = 0); |     void setResult(dsint result = 0); | ||||||
| 
 | 
 | ||||||
|     //helper functions
 |     //helper functions
 | ||||||
|     void emitLoadSourceFile(const QString path, int line = 0, int selection = 0); |     void emitLoadSourceFile(const QString path, int line = 0, int selection = 0); | ||||||
|  | @ -43,7 +43,7 @@ public: | ||||||
|     ReferenceManager* referenceManager; |     ReferenceManager* referenceManager; | ||||||
| 
 | 
 | ||||||
| signals: | signals: | ||||||
|     void disassembleAt(int_t va, int_t eip); |     void disassembleAt(dsint va, dsint eip); | ||||||
|     void repaintGui(); |     void repaintGui(); | ||||||
|     void dbgStateChanged(DBGSTATE state); |     void dbgStateChanged(DBGSTATE state); | ||||||
|     void addMsgToLog(QString msg); |     void addMsgToLog(QString msg); | ||||||
|  | @ -51,7 +51,7 @@ signals: | ||||||
|     void updateRegisters(); |     void updateRegisters(); | ||||||
|     void updateBreakpoints(); |     void updateBreakpoints(); | ||||||
|     void updateWindowTitle(QString filename); |     void updateWindowTitle(QString filename); | ||||||
|     void dumpAt(int_t va); |     void dumpAt(dsint va); | ||||||
|     void scriptAdd(int count, const char** lines); |     void scriptAdd(int count, const char** lines); | ||||||
|     void scriptClear(); |     void scriptClear(); | ||||||
|     void scriptSetIp(int line); |     void scriptSetIp(int line); | ||||||
|  | @ -66,14 +66,14 @@ signals: | ||||||
|     void clearSymbolLog(); |     void clearSymbolLog(); | ||||||
|     void setSymbolProgress(int progress); |     void setSymbolProgress(int progress); | ||||||
|     void referenceAddColumnAt(int width, QString title); |     void referenceAddColumnAt(int width, QString title); | ||||||
|     void referenceSetRowCount(int_t count); |     void referenceSetRowCount(dsint count); | ||||||
|     void referenceSetCellContent(int r, int c, QString s); |     void referenceSetCellContent(int r, int c, QString s); | ||||||
|     void referenceReloadData(); |     void referenceReloadData(); | ||||||
|     void referenceSetSingleSelection(int index, bool scroll); |     void referenceSetSingleSelection(int index, bool scroll); | ||||||
|     void referenceSetProgress(int progress); |     void referenceSetProgress(int progress); | ||||||
|     void referenceSetSearchStartCol(int col); |     void referenceSetSearchStartCol(int col); | ||||||
|     void referenceInitialize(QString name); |     void referenceInitialize(QString name); | ||||||
|     void stackDumpAt(uint_t va, uint_t csp); |     void stackDumpAt(duint va, duint csp); | ||||||
|     void updateDump(); |     void updateDump(); | ||||||
|     void updateThreads(); |     void updateThreads(); | ||||||
|     void updateMemory(); |     void updateMemory(); | ||||||
|  | @ -117,7 +117,7 @@ signals: | ||||||
| 
 | 
 | ||||||
| private: | private: | ||||||
|     QMutex* mBridgeMutex; |     QMutex* mBridgeMutex; | ||||||
|     int_t bridgeResult; |     dsint bridgeResult; | ||||||
|     volatile bool hasBridgeResult; |     volatile bool hasBridgeResult; | ||||||
|     volatile bool dbgStopped; |     volatile bool dbgStopped; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | @ -12,7 +12,7 @@ BridgeResult::~BridgeResult() | ||||||
|     Bridge::getBridge()->mBridgeMutex->unlock(); |     Bridge::getBridge()->mBridgeMutex->unlock(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| int_t BridgeResult::Wait() | dsint BridgeResult::Wait() | ||||||
| { | { | ||||||
|     while(!Bridge::getBridge()->hasBridgeResult) //wait for thread completion
 |     while(!Bridge::getBridge()->hasBridgeResult) //wait for thread completion
 | ||||||
|         Sleep(100); |         Sleep(100); | ||||||
|  |  | ||||||
|  | @ -8,7 +8,7 @@ class BridgeResult | ||||||
| public: | public: | ||||||
|     BridgeResult(); |     BridgeResult(); | ||||||
|     ~BridgeResult(); |     ~BridgeResult(); | ||||||
|     int_t Wait(); |     dsint Wait(); | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| #endif // BRIDGERESULT_H
 | #endif // BRIDGERESULT_H
 | ||||||
|  |  | ||||||
|  | @ -77,7 +77,7 @@ void BeaTokenizer::StringInstructionMemory(BeaInstructionToken* instr, int size, | ||||||
|     AddToken(instr, TokenMemorySegment, segment, 0); |     AddToken(instr, TokenMemorySegment, segment, 0); | ||||||
|     AddToken(instr, TokenUncategorized, ":", 0); |     AddToken(instr, TokenUncategorized, ":", 0); | ||||||
|     AddToken(instr, TokenMemoryBrackets, "[", 0); |     AddToken(instr, TokenMemoryBrackets, "[", 0); | ||||||
|     AddToken(instr, TokenMemoryBaseRegister, RegisterToString(sizeof(int_t) * 8, reg), 0); //EDI/RDI
 |     AddToken(instr, TokenMemoryBaseRegister, RegisterToString(sizeof(dsint) * 8, reg), 0); //EDI/RDI
 | ||||||
|     AddToken(instr, TokenMemoryBrackets, "]", 0); |     AddToken(instr, TokenMemoryBrackets, "]", 0); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -177,7 +177,7 @@ QString BeaTokenizer::PrintValue(const BeaTokenValue* value, bool module, int ma | ||||||
|     char labelText[MAX_LABEL_SIZE] = ""; |     char labelText[MAX_LABEL_SIZE] = ""; | ||||||
|     char module_[MAX_MODULE_SIZE] = ""; |     char module_[MAX_MODULE_SIZE] = ""; | ||||||
|     QString moduleText; |     QString moduleText; | ||||||
|     int_t addr = value->value; |     dsint addr = value->value; | ||||||
|     bool bHasLabel = DbgGetLabelAt(addr, SEG_DEFAULT, labelText); |     bool bHasLabel = DbgGetLabelAt(addr, SEG_DEFAULT, labelText); | ||||||
|     bool bHasModule = (module && DbgGetModuleAt(addr, module_) && !QString(labelText).startsWith("JMP.&")); |     bool bHasModule = (module && DbgGetModuleAt(addr, module_) && !QString(labelText).startsWith("JMP.&")); | ||||||
|     moduleText = QString(module_); |     moduleText = QString(module_); | ||||||
|  | @ -186,7 +186,7 @@ QString BeaTokenizer::PrintValue(const BeaTokenValue* value, bool module, int ma | ||||||
|     if(moduleText.length()) |     if(moduleText.length()) | ||||||
|         moduleText += "."; |         moduleText += "."; | ||||||
|     QString addrText; |     QString addrText; | ||||||
|     addrText = QString("%1").arg(addr & (uint_t) - 1, 0, 16, QChar('0')).toUpper(); |     addrText = QString("%1").arg(addr & (duint) - 1, 0, 16, QChar('0')).toUpper(); | ||||||
|     QString finalText; |     QString finalText; | ||||||
|     if(bHasLabel && bHasModule) //<module.label>
 |     if(bHasLabel && bHasModule) //<module.label>
 | ||||||
|         finalText = QString("<%1%2>").arg(moduleText).arg(labelText); |         finalText = QString("<%1%2>").arg(moduleText).arg(labelText); | ||||||
|  | @ -244,7 +244,7 @@ void BeaTokenizer::Argument(BeaInstructionToken* instr, const DISASM* disasm, co | ||||||
|         bool prependPlusMinus = false; |         bool prependPlusMinus = false; | ||||||
|         if(arg->Memory.BaseRegister) //base register
 |         if(arg->Memory.BaseRegister) //base register
 | ||||||
|         { |         { | ||||||
|             AddToken(instr, TokenMemoryBaseRegister, RegisterToString(sizeof(int_t) * 8, arg->Memory.BaseRegister), 0); |             AddToken(instr, TokenMemoryBaseRegister, RegisterToString(sizeof(dsint) * 8, arg->Memory.BaseRegister), 0); | ||||||
|             prependPlusMinus = true; |             prependPlusMinus = true; | ||||||
|         } |         } | ||||||
|         if(arg->Memory.IndexRegister) //index register + scale
 |         if(arg->Memory.IndexRegister) //index register + scale
 | ||||||
|  | @ -255,7 +255,7 @@ void BeaTokenizer::Argument(BeaInstructionToken* instr, const DISASM* disasm, co | ||||||
|                 AddToken(instr, TokenMemoryOperator, "+", 0); |                 AddToken(instr, TokenMemoryOperator, "+", 0); | ||||||
|                 AddToken(instr, TokenMemoryOperatorSpace, " ", 0); |                 AddToken(instr, TokenMemoryOperatorSpace, " ", 0); | ||||||
|             } |             } | ||||||
|             AddToken(instr, TokenMemoryIndexRegister, RegisterToString(sizeof(int_t) * 8, arg->Memory.IndexRegister), 0); |             AddToken(instr, TokenMemoryIndexRegister, RegisterToString(sizeof(dsint) * 8, arg->Memory.IndexRegister), 0); | ||||||
|             int scale = arg->Memory.Scale; |             int scale = arg->Memory.Scale; | ||||||
|             if(scale > 1) //eax * 1 = eax
 |             if(scale > 1) //eax * 1 = eax
 | ||||||
|             { |             { | ||||||
|  |  | ||||||
|  | @ -53,7 +53,7 @@ public: | ||||||
|     struct BeaTokenValue |     struct BeaTokenValue | ||||||
|     { |     { | ||||||
|         int size; //value size
 |         int size; //value size
 | ||||||
|         int_t value; //value
 |         dsint value; //value
 | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     struct BeaSingleToken |     struct BeaSingleToken | ||||||
|  |  | ||||||
|  | @ -20,14 +20,14 @@ QBeaEngine::QBeaEngine(int maxModuleSize) | ||||||
|  * |  * | ||||||
|  * @return      Return the RVA (Relative to the data pointer) of the nth instruction before the instruction pointed by ip |  * @return      Return the RVA (Relative to the data pointer) of the nth instruction before the instruction pointed by ip | ||||||
|  */ |  */ | ||||||
| ulong QBeaEngine::DisassembleBack(byte_t* data, uint_t base, uint_t size, uint_t ip, int n) | ulong QBeaEngine::DisassembleBack(byte_t* data, duint base, duint size, duint ip, int n) | ||||||
| { | { | ||||||
| 
 | 
 | ||||||
|     const unsigned int max_instructions = 128; |     const unsigned int max_instructions = 128; | ||||||
| 
 | 
 | ||||||
|     Q_UNUSED(base); |     Q_UNUSED(base); | ||||||
|     int i; |     int i; | ||||||
|     uint_t abuf[131], addr, back, cmdsize; |     duint abuf[131], addr, back, cmdsize; | ||||||
|     byte_t* pdata; |     byte_t* pdata; | ||||||
|     int len; |     int len; | ||||||
| 
 | 
 | ||||||
|  | @ -56,7 +56,7 @@ ulong QBeaEngine::DisassembleBack(byte_t* data, uint_t base, uint_t size, uint_t | ||||||
|     if(n == 0) |     if(n == 0) | ||||||
|         return ip; |         return ip; | ||||||
| 
 | 
 | ||||||
|     if(ip < (uint_t)n) |     if(ip < (duint)n) | ||||||
|         return ip; |         return ip; | ||||||
| 
 | 
 | ||||||
|     back = 16 * (n + 3); // Instruction length limited to 16
 |     back = 16 * (n + 3); // Instruction length limited to 16
 | ||||||
|  | @ -99,11 +99,11 @@ ulong QBeaEngine::DisassembleBack(byte_t* data, uint_t base, uint_t size, uint_t | ||||||
|  * |  * | ||||||
|  * @return      Return the RVA (Relative to the data pointer) of the nth instruction after the instruction pointed by ip |  * @return      Return the RVA (Relative to the data pointer) of the nth instruction after the instruction pointed by ip | ||||||
|  */ |  */ | ||||||
| ulong QBeaEngine::DisassembleNext(byte_t* data, uint_t base, uint_t size, uint_t ip, int n) | ulong QBeaEngine::DisassembleNext(byte_t* data, duint base, duint size, duint ip, int n) | ||||||
| { | { | ||||||
|     Q_UNUSED(base); |     Q_UNUSED(base); | ||||||
|     int i; |     int i; | ||||||
|     uint_t cmdsize; |     duint cmdsize; | ||||||
|     byte_t* pdata; |     byte_t* pdata; | ||||||
|     int len; |     int len; | ||||||
| 
 | 
 | ||||||
|  | @ -153,7 +153,7 @@ ulong QBeaEngine::DisassembleNext(byte_t* data, uint_t base, uint_t size, uint_t | ||||||
|  * |  * | ||||||
|  * @return      Return the disassembled instruction |  * @return      Return the disassembled instruction | ||||||
|  */ |  */ | ||||||
| Instruction_t QBeaEngine::DisassembleAt(byte_t* data, uint_t size, uint_t instIndex, uint_t origBase, uint_t origInstRVA) | Instruction_t QBeaEngine::DisassembleAt(byte_t* data, duint size, duint instIndex, duint origBase, duint origInstRVA) | ||||||
| { | { | ||||||
|     Instruction_t wInst; |     Instruction_t wInst; | ||||||
|     int len; |     int len; | ||||||
|  | @ -166,9 +166,9 @@ Instruction_t QBeaEngine::DisassembleAt(byte_t* data, uint_t size, uint_t instIn | ||||||
| #endif | #endif | ||||||
|     mDisasmStruct.Options = NoformatNumeral | ShowSegmentRegs; |     mDisasmStruct.Options = NoformatNumeral | ShowSegmentRegs; | ||||||
| 
 | 
 | ||||||
|     mDisasmStruct.EIP = (UIntPtr)((uint_t)data + (uint_t)instIndex); |     mDisasmStruct.EIP = (UIntPtr)((duint)data + (duint)instIndex); | ||||||
|     mDisasmStruct.VirtualAddr = origBase + origInstRVA; |     mDisasmStruct.VirtualAddr = origBase + origInstRVA; | ||||||
|     mDisasmStruct.SecurityBlock = (UIntPtr)((uint_t)size - instIndex); |     mDisasmStruct.SecurityBlock = (UIntPtr)((duint)size - instIndex); | ||||||
| 
 | 
 | ||||||
|     len = Disasm(&mDisasmStruct); |     len = Disasm(&mDisasmStruct); | ||||||
|     len = (len < 1) ? 1 : len ; |     len = (len < 1) ? 1 : len ; | ||||||
|  |  | ||||||
|  | @ -9,7 +9,7 @@ typedef struct _Instruction_t | ||||||
| { | { | ||||||
|     QString instStr; |     QString instStr; | ||||||
|     QByteArray dump; |     QByteArray dump; | ||||||
|     uint_t rva; |     duint rva; | ||||||
|     int length; |     int length; | ||||||
|     DISASM disasm; |     DISASM disasm; | ||||||
|     BeaTokenizer::BeaInstructionToken tokens; |     BeaTokenizer::BeaInstructionToken tokens; | ||||||
|  | @ -19,9 +19,9 @@ class QBeaEngine | ||||||
| { | { | ||||||
| public: | public: | ||||||
|     explicit QBeaEngine(int maxModuleSize); |     explicit QBeaEngine(int maxModuleSize); | ||||||
|     ulong DisassembleBack(byte_t* data, uint_t base, uint_t size, uint_t ip, int n); |     ulong DisassembleBack(byte_t* data, duint base, duint size, duint ip, int n); | ||||||
|     ulong DisassembleNext(byte_t* data, uint_t base, uint_t size, uint_t ip, int n); |     ulong DisassembleNext(byte_t* data, duint base, duint size, duint ip, int n); | ||||||
|     Instruction_t DisassembleAt(byte_t* data, uint_t size, uint_t instIndex, uint_t origBase, uint_t origInstRVA); |     Instruction_t DisassembleAt(byte_t* data, duint size, duint instIndex, duint origBase, duint origInstRVA); | ||||||
| 
 | 
 | ||||||
| private: | private: | ||||||
|     DISASM mDisasmStruct; |     DISASM mDisasmStruct; | ||||||
|  |  | ||||||
|  | @ -1,20 +0,0 @@ | ||||||
| #ifndef NEWTYPES_H |  | ||||||
| #define NEWTYPES_H |  | ||||||
| 
 |  | ||||||
| #include "Imports.h" |  | ||||||
| 
 |  | ||||||
| typedef short int16; |  | ||||||
| typedef unsigned short uint16; |  | ||||||
| 
 |  | ||||||
| typedef int int32; |  | ||||||
| typedef unsigned int uint32; |  | ||||||
| 
 |  | ||||||
| typedef long long int64; |  | ||||||
| typedef unsigned long long uint64; |  | ||||||
| 
 |  | ||||||
| typedef duint uint_t; |  | ||||||
| typedef dsint int_t; |  | ||||||
| 
 |  | ||||||
| typedef unsigned char byte_t; |  | ||||||
| 
 |  | ||||||
| #endif // NEWTYPES_H
 |  | ||||||
|  | @ -9,7 +9,7 @@ BreakpointsView::BreakpointsView(QWidget* parent) : QWidget(parent) | ||||||
|     mSoftBPTable = new StdTable(this); |     mSoftBPTable = new StdTable(this); | ||||||
|     int wCharWidth = mSoftBPTable->getCharWidth(); |     int wCharWidth = mSoftBPTable->getCharWidth(); | ||||||
|     mSoftBPTable->setContextMenuPolicy(Qt::CustomContextMenu); |     mSoftBPTable->setContextMenuPolicy(Qt::CustomContextMenu); | ||||||
|     mSoftBPTable->addColumnAt(8 + wCharWidth * 2 * sizeof(uint_t), "Software", false, "Address"); |     mSoftBPTable->addColumnAt(8 + wCharWidth * 2 * sizeof(duint), "Software", false, "Address"); | ||||||
|     mSoftBPTable->addColumnAt(8 + wCharWidth * 32, "Name", false); |     mSoftBPTable->addColumnAt(8 + wCharWidth * 32, "Name", false); | ||||||
|     mSoftBPTable->addColumnAt(8 + wCharWidth * 32, "Module/Label", false); |     mSoftBPTable->addColumnAt(8 + wCharWidth * 32, "Module/Label", false); | ||||||
|     mSoftBPTable->addColumnAt(8 + wCharWidth * 8, "State", false); |     mSoftBPTable->addColumnAt(8 + wCharWidth * 8, "State", false); | ||||||
|  | @ -18,7 +18,7 @@ BreakpointsView::BreakpointsView(QWidget* parent) : QWidget(parent) | ||||||
|     // Hardware
 |     // Hardware
 | ||||||
|     mHardBPTable = new StdTable(this); |     mHardBPTable = new StdTable(this); | ||||||
|     mHardBPTable->setContextMenuPolicy(Qt::CustomContextMenu); |     mHardBPTable->setContextMenuPolicy(Qt::CustomContextMenu); | ||||||
|     mHardBPTable->addColumnAt(8 + wCharWidth * 2 * sizeof(uint_t), "Hardware", false, "Address"); |     mHardBPTable->addColumnAt(8 + wCharWidth * 2 * sizeof(duint), "Hardware", false, "Address"); | ||||||
|     mHardBPTable->addColumnAt(8 + wCharWidth * 32, "Name", false); |     mHardBPTable->addColumnAt(8 + wCharWidth * 32, "Name", false); | ||||||
|     mHardBPTable->addColumnAt(8 + wCharWidth * 32, "Module/Label", false); |     mHardBPTable->addColumnAt(8 + wCharWidth * 32, "Module/Label", false); | ||||||
|     mHardBPTable->addColumnAt(8 + wCharWidth * 8, "State", false); |     mHardBPTable->addColumnAt(8 + wCharWidth * 8, "State", false); | ||||||
|  | @ -27,7 +27,7 @@ BreakpointsView::BreakpointsView(QWidget* parent) : QWidget(parent) | ||||||
|     // Memory
 |     // Memory
 | ||||||
|     mMemBPTable = new StdTable(this); |     mMemBPTable = new StdTable(this); | ||||||
|     mMemBPTable->setContextMenuPolicy(Qt::CustomContextMenu); |     mMemBPTable->setContextMenuPolicy(Qt::CustomContextMenu); | ||||||
|     mMemBPTable->addColumnAt(8 + wCharWidth * 2 * sizeof(uint_t), "Memory", false, "Address"); |     mMemBPTable->addColumnAt(8 + wCharWidth * 2 * sizeof(duint), "Memory", false, "Address"); | ||||||
|     mMemBPTable->addColumnAt(8 + wCharWidth * 32, "Name", false); |     mMemBPTable->addColumnAt(8 + wCharWidth * 32, "Name", false); | ||||||
|     mMemBPTable->addColumnAt(8 + wCharWidth * 32, "Module/Label", false); |     mMemBPTable->addColumnAt(8 + wCharWidth * 32, "Module/Label", false); | ||||||
|     mMemBPTable->addColumnAt(8 + wCharWidth * 8, "State", false); |     mMemBPTable->addColumnAt(8 + wCharWidth * 8, "State", false); | ||||||
|  | @ -79,7 +79,7 @@ void BreakpointsView::reloadData() | ||||||
|     mHardBPTable->setRowCount(wBPList.count); |     mHardBPTable->setRowCount(wBPList.count); | ||||||
|     for(wI = 0; wI < wBPList.count; wI++) |     for(wI = 0; wI < wBPList.count; wI++) | ||||||
|     { |     { | ||||||
|         QString addr_text = QString("%1").arg(wBPList.bp[wI].addr, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         QString addr_text = QString("%1").arg(wBPList.bp[wI].addr, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|         mHardBPTable->setCellContent(wI, 0, addr_text); |         mHardBPTable->setCellContent(wI, 0, addr_text); | ||||||
|         mHardBPTable->setCellContent(wI, 1, QString(wBPList.bp[wI].name)); |         mHardBPTable->setCellContent(wI, 1, QString(wBPList.bp[wI].name)); | ||||||
| 
 | 
 | ||||||
|  | @ -118,7 +118,7 @@ void BreakpointsView::reloadData() | ||||||
|     mSoftBPTable->setRowCount(wBPList.count); |     mSoftBPTable->setRowCount(wBPList.count); | ||||||
|     for(wI = 0; wI < wBPList.count; wI++) |     for(wI = 0; wI < wBPList.count; wI++) | ||||||
|     { |     { | ||||||
|         QString addr_text = QString("%1").arg(wBPList.bp[wI].addr, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         QString addr_text = QString("%1").arg(wBPList.bp[wI].addr, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|         mSoftBPTable->setCellContent(wI, 0, addr_text); |         mSoftBPTable->setCellContent(wI, 0, addr_text); | ||||||
|         mSoftBPTable->setCellContent(wI, 1, QString(wBPList.bp[wI].name)); |         mSoftBPTable->setCellContent(wI, 1, QString(wBPList.bp[wI].name)); | ||||||
| 
 | 
 | ||||||
|  | @ -157,7 +157,7 @@ void BreakpointsView::reloadData() | ||||||
|     mMemBPTable->setRowCount(wBPList.count); |     mMemBPTable->setRowCount(wBPList.count); | ||||||
|     for(wI = 0; wI < wBPList.count; wI++) |     for(wI = 0; wI < wBPList.count; wI++) | ||||||
|     { |     { | ||||||
|         QString addr_text = QString("%1").arg(wBPList.bp[wI].addr, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         QString addr_text = QString("%1").arg(wBPList.bp[wI].addr, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|         mMemBPTable->setCellContent(wI, 0, addr_text); |         mMemBPTable->setCellContent(wI, 0, addr_text); | ||||||
|         mMemBPTable->setCellContent(wI, 1, QString(wBPList.bp[wI].name)); |         mMemBPTable->setCellContent(wI, 1, QString(wBPList.bp[wI].name)); | ||||||
| 
 | 
 | ||||||
|  | @ -234,7 +234,7 @@ void BreakpointsView::hardwareBPContextMenuSlot(const QPoint & pos) | ||||||
|     { |     { | ||||||
|         int wI = 0; |         int wI = 0; | ||||||
|         QMenu* wMenu = new QMenu(this); |         QMenu* wMenu = new QMenu(this); | ||||||
|         uint_t wVA = table->getCellContent(table->getInitialSelection(), 0).toULongLong(0, 16); |         duint wVA = table->getCellContent(table->getInitialSelection(), 0).toULongLong(0, 16); | ||||||
|         BPMAP wBPList; |         BPMAP wBPList; | ||||||
| 
 | 
 | ||||||
|         // Remove
 |         // Remove
 | ||||||
|  | @ -288,7 +288,7 @@ void BreakpointsView::hardwareBPContextMenuSlot(const QPoint & pos) | ||||||
| void BreakpointsView::removeHardBPActionSlot() | void BreakpointsView::removeHardBPActionSlot() | ||||||
| { | { | ||||||
|     StdTable* table = mHardBPTable; |     StdTable* table = mHardBPTable; | ||||||
|     uint_t wVA = table->getCellContent(table->getInitialSelection(), 0).toULongLong(0, 16); |     duint wVA = table->getCellContent(table->getInitialSelection(), 0).toULongLong(0, 16); | ||||||
|     Breakpoints::removeBP(bp_hardware, wVA); |     Breakpoints::removeBP(bp_hardware, wVA); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -342,7 +342,7 @@ void BreakpointsView::softwareBPContextMenuSlot(const QPoint & pos) | ||||||
|     { |     { | ||||||
|         int wI = 0; |         int wI = 0; | ||||||
|         QMenu* wMenu = new QMenu(this); |         QMenu* wMenu = new QMenu(this); | ||||||
|         uint_t wVA = table->getCellContent(table->getInitialSelection(), 0).toULongLong(0, 16); |         duint wVA = table->getCellContent(table->getInitialSelection(), 0).toULongLong(0, 16); | ||||||
|         BPMAP wBPList; |         BPMAP wBPList; | ||||||
| 
 | 
 | ||||||
|         // Remove
 |         // Remove
 | ||||||
|  | @ -396,7 +396,7 @@ void BreakpointsView::softwareBPContextMenuSlot(const QPoint & pos) | ||||||
| void BreakpointsView::removeSoftBPActionSlot() | void BreakpointsView::removeSoftBPActionSlot() | ||||||
| { | { | ||||||
|     StdTable* table = mSoftBPTable; |     StdTable* table = mSoftBPTable; | ||||||
|     uint_t wVA = table->getCellContent(table->getInitialSelection(), 0).toULongLong(0, 16); |     duint wVA = table->getCellContent(table->getInitialSelection(), 0).toULongLong(0, 16); | ||||||
|     Breakpoints::removeBP(bp_normal, wVA); |     Breakpoints::removeBP(bp_normal, wVA); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -450,7 +450,7 @@ void BreakpointsView::memoryBPContextMenuSlot(const QPoint & pos) | ||||||
|     { |     { | ||||||
|         int wI = 0; |         int wI = 0; | ||||||
|         QMenu* wMenu = new QMenu(this); |         QMenu* wMenu = new QMenu(this); | ||||||
|         uint_t wVA = table->getCellContent(table->getInitialSelection(), 0).toULongLong(0, 16); |         duint wVA = table->getCellContent(table->getInitialSelection(), 0).toULongLong(0, 16); | ||||||
|         BPMAP wBPList; |         BPMAP wBPList; | ||||||
| 
 | 
 | ||||||
|         // Remove
 |         // Remove
 | ||||||
|  | @ -504,7 +504,7 @@ void BreakpointsView::memoryBPContextMenuSlot(const QPoint & pos) | ||||||
| void BreakpointsView::removeMemBPActionSlot() | void BreakpointsView::removeMemBPActionSlot() | ||||||
| { | { | ||||||
|     StdTable* table = mMemBPTable; |     StdTable* table = mMemBPTable; | ||||||
|     uint_t wVA = table->getCellContent(table->getInitialSelection(), 0).toULongLong(0, 16); |     duint wVA = table->getCellContent(table->getInitialSelection(), 0).toULongLong(0, 16); | ||||||
|     Breakpoints::removeBP(bp_memory, wVA); |     Breakpoints::removeBP(bp_memory, wVA); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -13,7 +13,7 @@ CPUDisassembly::CPUDisassembly(QWidget* parent) : Disassembly(parent) | ||||||
|     // Create the action list for the right click context menu
 |     // Create the action list for the right click context menu
 | ||||||
|     setupRightClickContextMenu(); |     setupRightClickContextMenu(); | ||||||
| 
 | 
 | ||||||
|     connect(Bridge::getBridge(), SIGNAL(disassembleAt(int_t, int_t)), this, SLOT(disassembleAt(int_t, int_t))); |     connect(Bridge::getBridge(), SIGNAL(disassembleAt(dsint, dsint)), this, SLOT(disassembleAt(dsint, dsint))); | ||||||
|     connect(Bridge::getBridge(), SIGNAL(dbgStateChanged(DBGSTATE)), this, SLOT(debugStateChangedSlot(DBGSTATE))); |     connect(Bridge::getBridge(), SIGNAL(dbgStateChanged(DBGSTATE)), this, SLOT(debugStateChangedSlot(DBGSTATE))); | ||||||
|     connect(Bridge::getBridge(), SIGNAL(selectionDisasmGet(SELECTIONDATA*)), this, SLOT(selectionGet(SELECTIONDATA*))); |     connect(Bridge::getBridge(), SIGNAL(selectionDisasmGet(SELECTIONDATA*)), this, SLOT(selectionGet(SELECTIONDATA*))); | ||||||
|     connect(Bridge::getBridge(), SIGNAL(selectionDisasmSet(const SELECTIONDATA*)), this, SLOT(selectionSet(const SELECTIONDATA*))); |     connect(Bridge::getBridge(), SIGNAL(selectionDisasmSet(const SELECTIONDATA*)), this, SLOT(selectionSet(const SELECTIONDATA*))); | ||||||
|  | @ -49,7 +49,7 @@ void CPUDisassembly::mouseDoubleClickEvent(QMouseEvent* event) | ||||||
|     { |     { | ||||||
|     case 0: //address
 |     case 0: //address
 | ||||||
|     { |     { | ||||||
|         int_t mSelectedVa = rvaToVa(getInitialSelection()); |         dsint mSelectedVa = rvaToVa(getInitialSelection()); | ||||||
|         if(mRvaDisplayEnabled && mSelectedVa == mRvaDisplayBase) |         if(mRvaDisplayEnabled && mSelectedVa == mRvaDisplayBase) | ||||||
|             mRvaDisplayEnabled = false; |             mRvaDisplayEnabled = false; | ||||||
|         else |         else | ||||||
|  | @ -86,7 +86,7 @@ void CPUDisassembly::mouseDoubleClickEvent(QMouseEvent* event) | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDisassembly::addFollowReferenceMenuItem(QString name, int_t value, QMenu* menu, bool isReferences) | void CPUDisassembly::addFollowReferenceMenuItem(QString name, dsint value, QMenu* menu, bool isReferences) | ||||||
| { | { | ||||||
|     foreach(QAction * action, menu->actions()) //check for duplicate action
 |     foreach(QAction * action, menu->actions()) //check for duplicate action
 | ||||||
|     if(action->text() == name) |     if(action->text() == name) | ||||||
|  | @ -94,11 +94,11 @@ void CPUDisassembly::addFollowReferenceMenuItem(QString name, int_t value, QMenu | ||||||
|     QAction* newAction = new QAction(name, this); |     QAction* newAction = new QAction(name, this); | ||||||
|     newAction->setFont(QFont("Courier New", 8)); |     newAction->setFont(QFont("Courier New", 8)); | ||||||
|     menu->addAction(newAction); |     menu->addAction(newAction); | ||||||
|     newAction->setObjectName(QString(isReferences ? "REF|" : "DUMP|") + QString("%1").arg(value, sizeof(int_t) * 2, 16, QChar('0')).toUpper()); |     newAction->setObjectName(QString(isReferences ? "REF|" : "DUMP|") + QString("%1").arg(value, sizeof(dsint) * 2, 16, QChar('0')).toUpper()); | ||||||
|     connect(newAction, SIGNAL(triggered()), this, SLOT(followActionSlot())); |     connect(newAction, SIGNAL(triggered()), this, SLOT(followActionSlot())); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDisassembly::setupFollowReferenceMenu(int_t wVA, QMenu* menu, bool isReferences) | void CPUDisassembly::setupFollowReferenceMenu(dsint wVA, QMenu* menu, bool isReferences) | ||||||
| { | { | ||||||
|     //remove previous actions
 |     //remove previous actions
 | ||||||
|     QList<QAction*> list = menu->actions(); |     QList<QAction*> list = menu->actions(); | ||||||
|  | @ -171,14 +171,14 @@ void CPUDisassembly::contextMenuEvent(QContextMenuEvent* event) | ||||||
|     { |     { | ||||||
|         int wI; |         int wI; | ||||||
|         QMenu* wMenu = new QMenu(this); |         QMenu* wMenu = new QMenu(this); | ||||||
|         uint_t wVA = rvaToVa(getInitialSelection()); |         duint wVA = rvaToVa(getInitialSelection()); | ||||||
|         BPXTYPE wBpType = DbgGetBpxTypeAt(wVA); |         BPXTYPE wBpType = DbgGetBpxTypeAt(wVA); | ||||||
| 
 | 
 | ||||||
|         // Build Menu
 |         // Build Menu
 | ||||||
|         wMenu->addMenu(mBinaryMenu); |         wMenu->addMenu(mBinaryMenu); | ||||||
|         wMenu->addMenu(mCopyMenu); |         wMenu->addMenu(mCopyMenu); | ||||||
|         int_t start = rvaToVa(getSelectionStart()); |         dsint start = rvaToVa(getSelectionStart()); | ||||||
|         int_t end = rvaToVa(getSelectionEnd()); |         dsint end = rvaToVa(getSelectionEnd()); | ||||||
|         if(DbgFunctions()->PatchInRange(start, end)) //nothing patched in selected range
 |         if(DbgFunctions()->PatchInRange(start, end)) //nothing patched in selected range
 | ||||||
|             wMenu->addAction(mUndoSelection); |             wMenu->addAction(mUndoSelection); | ||||||
| 
 | 
 | ||||||
|  | @ -260,8 +260,8 @@ void CPUDisassembly::contextMenuEvent(QContextMenuEvent* event) | ||||||
|         wMenu->addAction(mSetComment); |         wMenu->addAction(mSetComment); | ||||||
|         wMenu->addAction(mSetBookmark); |         wMenu->addAction(mSetBookmark); | ||||||
| 
 | 
 | ||||||
|         uint_t selection_start = rvaToVa(getSelectionStart()); |         duint selection_start = rvaToVa(getSelectionStart()); | ||||||
|         uint_t selection_end = rvaToVa(getSelectionEnd()); |         duint selection_end = rvaToVa(getSelectionEnd()); | ||||||
|         if(!DbgFunctionOverlaps(selection_start, selection_end)) |         if(!DbgFunctionOverlaps(selection_start, selection_end)) | ||||||
|         { |         { | ||||||
|             mToggleFunction->setText("Add function"); |             mToggleFunction->setText("Add function"); | ||||||
|  | @ -656,17 +656,17 @@ void CPUDisassembly::toggleInt3BPAction() | ||||||
| { | { | ||||||
|     if(!DbgIsDebugging()) |     if(!DbgIsDebugging()) | ||||||
|         return; |         return; | ||||||
|     uint_t wVA = rvaToVa(getInitialSelection()); |     duint wVA = rvaToVa(getInitialSelection()); | ||||||
|     BPXTYPE wBpType = DbgGetBpxTypeAt(wVA); |     BPXTYPE wBpType = DbgGetBpxTypeAt(wVA); | ||||||
|     QString wCmd; |     QString wCmd; | ||||||
| 
 | 
 | ||||||
|     if((wBpType & bp_normal) == bp_normal) |     if((wBpType & bp_normal) == bp_normal) | ||||||
|     { |     { | ||||||
|         wCmd = "bc " + QString("%1").arg(wVA, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         wCmd = "bc " + QString("%1").arg(wVA, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     } |     } | ||||||
|     else |     else | ||||||
|     { |     { | ||||||
|         wCmd = "bp " + QString("%1").arg(wVA, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         wCmd = "bp " + QString("%1").arg(wVA, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     DbgCmdExec(wCmd.toUtf8().constData()); |     DbgCmdExec(wCmd.toUtf8().constData()); | ||||||
|  | @ -676,17 +676,17 @@ void CPUDisassembly::toggleInt3BPAction() | ||||||
| 
 | 
 | ||||||
| void CPUDisassembly::toggleHwBpActionSlot() | void CPUDisassembly::toggleHwBpActionSlot() | ||||||
| { | { | ||||||
|     uint_t wVA = rvaToVa(getInitialSelection()); |     duint wVA = rvaToVa(getInitialSelection()); | ||||||
|     BPXTYPE wBpType = DbgGetBpxTypeAt(wVA); |     BPXTYPE wBpType = DbgGetBpxTypeAt(wVA); | ||||||
|     QString wCmd; |     QString wCmd; | ||||||
| 
 | 
 | ||||||
|     if((wBpType & bp_hardware) == bp_hardware) |     if((wBpType & bp_hardware) == bp_hardware) | ||||||
|     { |     { | ||||||
|         wCmd = "bphwc " + QString("%1").arg(wVA, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         wCmd = "bphwc " + QString("%1").arg(wVA, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     } |     } | ||||||
|     else |     else | ||||||
|     { |     { | ||||||
|         wCmd = "bphws " + QString("%1").arg(wVA, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         wCmd = "bphws " + QString("%1").arg(wVA, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     DbgCmdExec(wCmd.toUtf8().constData()); |     DbgCmdExec(wCmd.toUtf8().constData()); | ||||||
|  | @ -713,7 +713,7 @@ void CPUDisassembly::setHwBpOnSlot3ActionSlot() | ||||||
|     setHwBpAt(rvaToVa(getInitialSelection()), 3); |     setHwBpAt(rvaToVa(getInitialSelection()), 3); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDisassembly::setHwBpAt(uint_t va, int slot) | void CPUDisassembly::setHwBpAt(duint va, int slot) | ||||||
| { | { | ||||||
|     BPXTYPE wBpType = DbgGetBpxTypeAt(va); |     BPXTYPE wBpType = DbgGetBpxTypeAt(va); | ||||||
| 
 | 
 | ||||||
|  | @ -742,17 +742,17 @@ void CPUDisassembly::setHwBpAt(uint_t va, int slot) | ||||||
| 
 | 
 | ||||||
|     if(wSlotIndex < 0) // Slot not used
 |     if(wSlotIndex < 0) // Slot not used
 | ||||||
|     { |     { | ||||||
|         wCmd = "bphws " + QString("%1").arg(va, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         wCmd = "bphws " + QString("%1").arg(va, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|         DbgCmdExec(wCmd.toUtf8().constData()); |         DbgCmdExec(wCmd.toUtf8().constData()); | ||||||
|     } |     } | ||||||
|     else // Slot used
 |     else // Slot used
 | ||||||
|     { |     { | ||||||
|         wCmd = "bphwc " + QString("%1").arg((uint_t)(wBPList.bp[wSlotIndex].addr), sizeof(uint_t) * 2, 16, QChar('0')).toUpper(); |         wCmd = "bphwc " + QString("%1").arg((duint)(wBPList.bp[wSlotIndex].addr), sizeof(duint) * 2, 16, QChar('0')).toUpper(); | ||||||
|         DbgCmdExec(wCmd.toUtf8().constData()); |         DbgCmdExec(wCmd.toUtf8().constData()); | ||||||
| 
 | 
 | ||||||
|         Sleep(200); |         Sleep(200); | ||||||
| 
 | 
 | ||||||
|         wCmd = "bphws " + QString("%1").arg(va, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         wCmd = "bphws " + QString("%1").arg(va, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|         DbgCmdExec(wCmd.toUtf8().constData()); |         DbgCmdExec(wCmd.toUtf8().constData()); | ||||||
|     } |     } | ||||||
|     if(wBPList.count) |     if(wBPList.count) | ||||||
|  | @ -763,8 +763,8 @@ void CPUDisassembly::setNewOriginHereActionSlot() | ||||||
| { | { | ||||||
|     if(!DbgIsDebugging()) |     if(!DbgIsDebugging()) | ||||||
|         return; |         return; | ||||||
|     uint_t wVA = rvaToVa(getInitialSelection()); |     duint wVA = rvaToVa(getInitialSelection()); | ||||||
|     QString wCmd = "cip=" + QString("%1").arg(wVA, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString wCmd = "cip=" + QString("%1").arg(wVA, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(wCmd.toUtf8().constData()); |     DbgCmdExec(wCmd.toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -772,9 +772,9 @@ void CPUDisassembly::setLabel() | ||||||
| { | { | ||||||
|     if(!DbgIsDebugging()) |     if(!DbgIsDebugging()) | ||||||
|         return; |         return; | ||||||
|     uint_t wVA = rvaToVa(getInitialSelection()); |     duint wVA = rvaToVa(getInitialSelection()); | ||||||
|     LineEditDialog mLineEdit(this); |     LineEditDialog mLineEdit(this); | ||||||
|     QString addr_text = QString("%1").arg(wVA, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addr_text = QString("%1").arg(wVA, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     char label_text[MAX_COMMENT_SIZE] = ""; |     char label_text[MAX_COMMENT_SIZE] = ""; | ||||||
|     if(DbgGetLabelAt((duint)wVA, SEG_DEFAULT, label_text)) |     if(DbgGetLabelAt((duint)wVA, SEG_DEFAULT, label_text)) | ||||||
|         mLineEdit.setText(QString(label_text)); |         mLineEdit.setText(QString(label_text)); | ||||||
|  | @ -796,9 +796,9 @@ void CPUDisassembly::setComment() | ||||||
| { | { | ||||||
|     if(!DbgIsDebugging()) |     if(!DbgIsDebugging()) | ||||||
|         return; |         return; | ||||||
|     uint_t wVA = rvaToVa(getInitialSelection()); |     duint wVA = rvaToVa(getInitialSelection()); | ||||||
|     LineEditDialog mLineEdit(this); |     LineEditDialog mLineEdit(this); | ||||||
|     QString addr_text = QString("%1").arg(wVA, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addr_text = QString("%1").arg(wVA, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     char comment_text[MAX_COMMENT_SIZE] = ""; |     char comment_text[MAX_COMMENT_SIZE] = ""; | ||||||
|     if(DbgGetCommentAt((duint)wVA, comment_text)) |     if(DbgGetCommentAt((duint)wVA, comment_text)) | ||||||
|     { |     { | ||||||
|  | @ -825,7 +825,7 @@ void CPUDisassembly::setBookmark() | ||||||
| { | { | ||||||
|     if(!DbgIsDebugging()) |     if(!DbgIsDebugging()) | ||||||
|         return; |         return; | ||||||
|     uint_t wVA = rvaToVa(getInitialSelection()); |     duint wVA = rvaToVa(getInitialSelection()); | ||||||
|     bool result; |     bool result; | ||||||
|     if(DbgGetBookmarkAt(wVA)) |     if(DbgGetBookmarkAt(wVA)) | ||||||
|         result = DbgSetBookmarkAt(wVA, false); |         result = DbgSetBookmarkAt(wVA, false); | ||||||
|  | @ -846,14 +846,14 @@ void CPUDisassembly::toggleFunction() | ||||||
| { | { | ||||||
|     if(!DbgIsDebugging()) |     if(!DbgIsDebugging()) | ||||||
|         return; |         return; | ||||||
|     uint_t start = rvaToVa(getSelectionStart()); |     duint start = rvaToVa(getSelectionStart()); | ||||||
|     uint_t end = rvaToVa(getSelectionEnd()); |     duint end = rvaToVa(getSelectionEnd()); | ||||||
|     uint_t function_start = 0; |     duint function_start = 0; | ||||||
|     uint_t function_end = 0; |     duint function_end = 0; | ||||||
|     if(!DbgFunctionOverlaps(start, end)) |     if(!DbgFunctionOverlaps(start, end)) | ||||||
|     { |     { | ||||||
|         QString start_text = QString("%1").arg(start, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         QString start_text = QString("%1").arg(start, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|         QString end_text = QString("%1").arg(end, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         QString end_text = QString("%1").arg(end, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|         char labeltext[MAX_LABEL_SIZE] = ""; |         char labeltext[MAX_LABEL_SIZE] = ""; | ||||||
|         QString label_text = ""; |         QString label_text = ""; | ||||||
|         if(DbgGetLabelAt(start, SEG_DEFAULT, labeltext)) |         if(DbgGetLabelAt(start, SEG_DEFAULT, labeltext)) | ||||||
|  | @ -870,13 +870,13 @@ void CPUDisassembly::toggleFunction() | ||||||
|     } |     } | ||||||
|     else |     else | ||||||
|     { |     { | ||||||
|         for(uint_t i = start; i <= end; i++) |         for(duint i = start; i <= end; i++) | ||||||
|         { |         { | ||||||
|             if(DbgFunctionGet(i, &function_start, &function_end)) |             if(DbgFunctionGet(i, &function_start, &function_end)) | ||||||
|                 break; |                 break; | ||||||
|         } |         } | ||||||
|         QString start_text = QString("%1").arg(function_start, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         QString start_text = QString("%1").arg(function_start, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|         QString end_text = QString("%1").arg(function_end, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         QString end_text = QString("%1").arg(function_end, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|         char labeltext[MAX_LABEL_SIZE] = ""; |         char labeltext[MAX_LABEL_SIZE] = ""; | ||||||
|         QString label_text = ""; |         QString label_text = ""; | ||||||
|         if(DbgGetLabelAt(function_start, SEG_DEFAULT, labeltext)) |         if(DbgGetLabelAt(function_start, SEG_DEFAULT, labeltext)) | ||||||
|  | @ -901,16 +901,16 @@ void CPUDisassembly::assembleAt() | ||||||
| 
 | 
 | ||||||
|     do |     do | ||||||
|     { |     { | ||||||
|         int_t wRVA = getInitialSelection(); |         dsint wRVA = getInitialSelection(); | ||||||
|         uint_t wVA = rvaToVa(wRVA); |         duint wVA = rvaToVa(wRVA); | ||||||
|         QString addr_text = QString("%1").arg(wVA, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         QString addr_text = QString("%1").arg(wVA, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
| 
 | 
 | ||||||
|         QByteArray wBuffer; |         QByteArray wBuffer; | ||||||
| 
 | 
 | ||||||
|         int_t wMaxByteCountToRead = 16 * 2; |         dsint wMaxByteCountToRead = 16 * 2; | ||||||
| 
 | 
 | ||||||
|         //TODO: fix size problems
 |         //TODO: fix size problems
 | ||||||
|         int_t size = getSize(); |         dsint size = getSize(); | ||||||
|         if(!size) |         if(!size) | ||||||
|             size = wRVA; |             size = wRVA; | ||||||
| 
 | 
 | ||||||
|  | @ -963,10 +963,10 @@ void CPUDisassembly::assembleAt() | ||||||
|         //select next instruction after assembling
 |         //select next instruction after assembling
 | ||||||
|         setSingleSelection(wRVA); |         setSingleSelection(wRVA); | ||||||
| 
 | 
 | ||||||
|         int_t botRVA = getTableOffset(); |         dsint botRVA = getTableOffset(); | ||||||
|         int_t topRVA = getInstructionRVA(getTableOffset(), getNbrOfLineToPrint() - 1); |         dsint topRVA = getInstructionRVA(getTableOffset(), getNbrOfLineToPrint() - 1); | ||||||
| 
 | 
 | ||||||
|         int_t wInstrSize = getInstructionRVA(wRVA, 1) - wRVA - 1; |         dsint wInstrSize = getInstructionRVA(wRVA, 1) - wRVA - 1; | ||||||
| 
 | 
 | ||||||
|         expandSelectionUpTo(wRVA + wInstrSize); |         expandSelectionUpTo(wRVA + wInstrSize); | ||||||
|         selectNext(false); |         selectNext(false); | ||||||
|  | @ -1010,20 +1010,20 @@ void CPUDisassembly::gotoFileOffset() | ||||||
|     mGotoDialog.setWindowTitle("Goto File Offset in " + QString(modname)); |     mGotoDialog.setWindowTitle("Goto File Offset in " + QString(modname)); | ||||||
|     if(mGotoDialog.exec() != QDialog::Accepted) |     if(mGotoDialog.exec() != QDialog::Accepted) | ||||||
|         return; |         return; | ||||||
|     uint_t value = DbgValFromString(mGotoDialog.expressionText.toUtf8().constData()); |     duint value = DbgValFromString(mGotoDialog.expressionText.toUtf8().constData()); | ||||||
|     value = DbgFunctions()->FileOffsetToVa(modname, value); |     value = DbgFunctions()->FileOffsetToVa(modname, value); | ||||||
|     DbgCmdExec(QString().sprintf("disasm \"%p\"", value).toUtf8().constData()); |     DbgCmdExec(QString().sprintf("disasm \"%p\"", value).toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDisassembly::gotoStartSlot() | void CPUDisassembly::gotoStartSlot() | ||||||
| { | { | ||||||
|     uint_t dest = mMemPage->getBase(); |     duint dest = mMemPage->getBase(); | ||||||
|     DbgCmdExec(QString().sprintf("disasm \"%p\"", dest).toUtf8().constData()); |     DbgCmdExec(QString().sprintf("disasm \"%p\"", dest).toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDisassembly::gotoEndSlot() | void CPUDisassembly::gotoEndSlot() | ||||||
| { | { | ||||||
|     uint_t dest = mMemPage->getBase() + mMemPage->getSize() - (getViewableRowsCount() * 16); |     duint dest = mMemPage->getBase() + mMemPage->getSize() - (getViewableRowsCount() * 16); | ||||||
|     DbgCmdExec(QString().sprintf("disasm \"%p\"", dest).toUtf8().constData()); |     DbgCmdExec(QString().sprintf("disasm \"%p\"", dest).toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -1036,7 +1036,7 @@ void CPUDisassembly::followActionSlot() | ||||||
|         DbgCmdExec(QString().sprintf("dump \"%s\"", action->objectName().mid(5).toUtf8().constData()).toUtf8().constData()); |         DbgCmdExec(QString().sprintf("dump \"%s\"", action->objectName().mid(5).toUtf8().constData()).toUtf8().constData()); | ||||||
|     else if(action->objectName().startsWith("REF|")) |     else if(action->objectName().startsWith("REF|")) | ||||||
|     { |     { | ||||||
|         QString addrText = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         QString addrText = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|         QString value = action->objectName().mid(4); |         QString value = action->objectName().mid(4); | ||||||
|         DbgCmdExec(QString("findref \"" + value +  "\", " + addrText).toUtf8().constData()); |         DbgCmdExec(QString("findref \"" + value +  "\", " + addrText).toUtf8().constData()); | ||||||
|         emit displayReferencesWidget(); |         emit displayReferencesWidget(); | ||||||
|  | @ -1055,9 +1055,9 @@ void CPUDisassembly::gotoNext() | ||||||
| 
 | 
 | ||||||
| void CPUDisassembly::findReferences() | void CPUDisassembly::findReferences() | ||||||
| { | { | ||||||
|     QString addrStart = QString("%1").arg(rvaToVa(getSelectionStart()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addrStart = QString("%1").arg(rvaToVa(getSelectionStart()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     QString addrEnd = QString("%1").arg(rvaToVa(getSelectionEnd()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addrEnd = QString("%1").arg(rvaToVa(getSelectionEnd()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     QString addrDisasm = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addrDisasm = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("findrefrange " + addrStart + ", " + addrEnd + ", " + addrDisasm).toUtf8().constData()); |     DbgCmdExec(QString("findrefrange " + addrStart + ", " + addrEnd + ", " + addrDisasm).toUtf8().constData()); | ||||||
|     emit displayReferencesWidget(); |     emit displayReferencesWidget(); | ||||||
| } | } | ||||||
|  | @ -1065,25 +1065,25 @@ void CPUDisassembly::findReferences() | ||||||
| void CPUDisassembly::findConstant() | void CPUDisassembly::findConstant() | ||||||
| { | { | ||||||
|     WordEditDialog wordEdit(this); |     WordEditDialog wordEdit(this); | ||||||
|     wordEdit.setup("Enter Constant", 0, sizeof(int_t)); |     wordEdit.setup("Enter Constant", 0, sizeof(dsint)); | ||||||
|     if(wordEdit.exec() != QDialog::Accepted) //cancel pressed
 |     if(wordEdit.exec() != QDialog::Accepted) //cancel pressed
 | ||||||
|         return; |         return; | ||||||
|     QString addrText = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addrText = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     QString constText = QString("%1").arg(wordEdit.getVal(), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString constText = QString("%1").arg(wordEdit.getVal(), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("findref " + constText + ", " + addrText).toUtf8().constData()); |     DbgCmdExec(QString("findref " + constText + ", " + addrText).toUtf8().constData()); | ||||||
|     emit displayReferencesWidget(); |     emit displayReferencesWidget(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDisassembly::findStrings() | void CPUDisassembly::findStrings() | ||||||
| { | { | ||||||
|     QString addrText = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addrText = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("strref " + addrText).toUtf8().constData()); |     DbgCmdExec(QString("strref " + addrText).toUtf8().constData()); | ||||||
|     emit displayReferencesWidget(); |     emit displayReferencesWidget(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDisassembly::findCalls() | void CPUDisassembly::findCalls() | ||||||
| { | { | ||||||
|     QString addrText = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addrText = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("modcallfind " + addrText).toUtf8().constData()); |     DbgCmdExec(QString("modcallfind " + addrText).toUtf8().constData()); | ||||||
|     emit displayReferencesWidget(); |     emit displayReferencesWidget(); | ||||||
| } | } | ||||||
|  | @ -1096,10 +1096,10 @@ void CPUDisassembly::findPattern() | ||||||
|     hexEdit.setWindowTitle("Find Pattern..."); |     hexEdit.setWindowTitle("Find Pattern..."); | ||||||
|     if(hexEdit.exec() != QDialog::Accepted) |     if(hexEdit.exec() != QDialog::Accepted) | ||||||
|         return; |         return; | ||||||
|     int_t addr = rvaToVa(getSelectionStart()); |     dsint addr = rvaToVa(getSelectionStart()); | ||||||
|     if(hexEdit.entireBlock()) |     if(hexEdit.entireBlock()) | ||||||
|         addr = DbgMemFindBaseAddr(addr, 0); |         addr = DbgMemFindBaseAddr(addr, 0); | ||||||
|     QString addrText = QString("%1").arg(addr, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addrText = QString("%1").arg(addr, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("findall " + addrText + ", " + hexEdit.mHexEdit->pattern()).toUtf8().constData()); |     DbgCmdExec(QString("findall " + addrText + ", " + hexEdit.mHexEdit->pattern()).toUtf8().constData()); | ||||||
|     emit displayReferencesWidget(); |     emit displayReferencesWidget(); | ||||||
| } | } | ||||||
|  | @ -1113,10 +1113,10 @@ void CPUDisassembly::selectionGet(SELECTIONDATA* selection) | ||||||
| 
 | 
 | ||||||
| void CPUDisassembly::selectionSet(const SELECTIONDATA* selection) | void CPUDisassembly::selectionSet(const SELECTIONDATA* selection) | ||||||
| { | { | ||||||
|     int_t selMin = getBase(); |     dsint selMin = getBase(); | ||||||
|     int_t selMax = selMin + getSize(); |     dsint selMax = selMin + getSize(); | ||||||
|     int_t start = selection->start; |     dsint start = selection->start; | ||||||
|     int_t end = selection->end; |     dsint end = selection->end; | ||||||
|     if(start < selMin || start >= selMax || end < selMin || end >= selMax) //selection out of range
 |     if(start < selMin || start >= selMax || end < selMin || end >= selMax) //selection out of range
 | ||||||
|     { |     { | ||||||
|         Bridge::getBridge()->setResult(0); |         Bridge::getBridge()->setResult(0); | ||||||
|  | @ -1140,17 +1140,17 @@ void CPUDisassembly::enableHighlightingMode() | ||||||
| void CPUDisassembly::binaryEditSlot() | void CPUDisassembly::binaryEditSlot() | ||||||
| { | { | ||||||
|     HexEditDialog hexEdit(this); |     HexEditDialog hexEdit(this); | ||||||
|     int_t selStart = getSelectionStart(); |     dsint selStart = getSelectionStart(); | ||||||
|     int_t selSize = getSelectionEnd() - selStart + 1; |     dsint selSize = getSelectionEnd() - selStart + 1; | ||||||
|     byte_t* data = new byte_t[selSize]; |     byte_t* data = new byte_t[selSize]; | ||||||
|     mMemPage->read(data, selStart, selSize); |     mMemPage->read(data, selStart, selSize); | ||||||
|     hexEdit.mHexEdit->setData(QByteArray((const char*)data, selSize)); |     hexEdit.mHexEdit->setData(QByteArray((const char*)data, selSize)); | ||||||
|     delete [] data; |     delete [] data; | ||||||
|     hexEdit.setWindowTitle("Edit code at " + QString("%1").arg(rvaToVa(selStart), sizeof(int_t) * 2, 16, QChar('0')).toUpper()); |     hexEdit.setWindowTitle("Edit code at " + QString("%1").arg(rvaToVa(selStart), sizeof(dsint) * 2, 16, QChar('0')).toUpper()); | ||||||
|     if(hexEdit.exec() != QDialog::Accepted) |     if(hexEdit.exec() != QDialog::Accepted) | ||||||
|         return; |         return; | ||||||
|     int_t dataSize = hexEdit.mHexEdit->data().size(); |     dsint dataSize = hexEdit.mHexEdit->data().size(); | ||||||
|     int_t newSize = selSize > dataSize ? selSize : dataSize; |     dsint newSize = selSize > dataSize ? selSize : dataSize; | ||||||
|     data = new byte_t[newSize]; |     data = new byte_t[newSize]; | ||||||
|     mMemPage->read(data, selStart, newSize); |     mMemPage->read(data, selStart, newSize); | ||||||
|     QByteArray patched = hexEdit.mHexEdit->applyMaskedData(QByteArray((const char*)data, newSize)); |     QByteArray patched = hexEdit.mHexEdit->applyMaskedData(QByteArray((const char*)data, newSize)); | ||||||
|  | @ -1162,12 +1162,12 @@ void CPUDisassembly::binaryFillSlot() | ||||||
| { | { | ||||||
|     HexEditDialog hexEdit(this); |     HexEditDialog hexEdit(this); | ||||||
|     hexEdit.mHexEdit->setOverwriteMode(false); |     hexEdit.mHexEdit->setOverwriteMode(false); | ||||||
|     int_t selStart = getSelectionStart(); |     dsint selStart = getSelectionStart(); | ||||||
|     hexEdit.setWindowTitle("Fill code at " + QString("%1").arg(rvaToVa(selStart), sizeof(int_t) * 2, 16, QChar('0')).toUpper()); |     hexEdit.setWindowTitle("Fill code at " + QString("%1").arg(rvaToVa(selStart), sizeof(dsint) * 2, 16, QChar('0')).toUpper()); | ||||||
|     if(hexEdit.exec() != QDialog::Accepted) |     if(hexEdit.exec() != QDialog::Accepted) | ||||||
|         return; |         return; | ||||||
|     QString pattern = hexEdit.mHexEdit->pattern(); |     QString pattern = hexEdit.mHexEdit->pattern(); | ||||||
|     int_t selSize = getSelectionEnd() - selStart + 1; |     dsint selSize = getSelectionEnd() - selStart + 1; | ||||||
|     byte_t* data = new byte_t[selSize]; |     byte_t* data = new byte_t[selSize]; | ||||||
|     mMemPage->read(data, selStart, selSize); |     mMemPage->read(data, selStart, selSize); | ||||||
|     hexEdit.mHexEdit->setData(QByteArray((const char*)data, selSize)); |     hexEdit.mHexEdit->setData(QByteArray((const char*)data, selSize)); | ||||||
|  | @ -1181,8 +1181,8 @@ void CPUDisassembly::binaryFillSlot() | ||||||
| void CPUDisassembly::binaryFillNopsSlot() | void CPUDisassembly::binaryFillNopsSlot() | ||||||
| { | { | ||||||
|     HexEditDialog hexEdit(this); |     HexEditDialog hexEdit(this); | ||||||
|     int_t selStart = getSelectionStart(); |     dsint selStart = getSelectionStart(); | ||||||
|     int_t selSize = getSelectionEnd() - selStart + 1; |     dsint selSize = getSelectionEnd() - selStart + 1; | ||||||
|     byte_t* data = new byte_t[selSize]; |     byte_t* data = new byte_t[selSize]; | ||||||
|     mMemPage->read(data, selStart, selSize); |     mMemPage->read(data, selStart, selSize); | ||||||
|     hexEdit.mHexEdit->setData(QByteArray((const char*)data, selSize)); |     hexEdit.mHexEdit->setData(QByteArray((const char*)data, selSize)); | ||||||
|  | @ -1196,8 +1196,8 @@ void CPUDisassembly::binaryFillNopsSlot() | ||||||
| void CPUDisassembly::binaryCopySlot() | void CPUDisassembly::binaryCopySlot() | ||||||
| { | { | ||||||
|     HexEditDialog hexEdit(this); |     HexEditDialog hexEdit(this); | ||||||
|     int_t selStart = getSelectionStart(); |     dsint selStart = getSelectionStart(); | ||||||
|     int_t selSize = getSelectionEnd() - selStart + 1; |     dsint selSize = getSelectionEnd() - selStart + 1; | ||||||
|     byte_t* data = new byte_t[selSize]; |     byte_t* data = new byte_t[selSize]; | ||||||
|     mMemPage->read(data, selStart, selSize); |     mMemPage->read(data, selStart, selSize); | ||||||
|     hexEdit.mHexEdit->setData(QByteArray((const char*)data, selSize)); |     hexEdit.mHexEdit->setData(QByteArray((const char*)data, selSize)); | ||||||
|  | @ -1208,8 +1208,8 @@ void CPUDisassembly::binaryCopySlot() | ||||||
| void CPUDisassembly::binaryPasteSlot() | void CPUDisassembly::binaryPasteSlot() | ||||||
| { | { | ||||||
|     HexEditDialog hexEdit(this); |     HexEditDialog hexEdit(this); | ||||||
|     int_t selStart = getSelectionStart(); |     dsint selStart = getSelectionStart(); | ||||||
|     int_t selSize = getSelectionEnd() - selStart + 1; |     dsint selSize = getSelectionEnd() - selStart + 1; | ||||||
|     QClipboard* clipboard = QApplication::clipboard(); |     QClipboard* clipboard = QApplication::clipboard(); | ||||||
|     hexEdit.mHexEdit->setData(clipboard->text()); |     hexEdit.mHexEdit->setData(clipboard->text()); | ||||||
| 
 | 
 | ||||||
|  | @ -1224,8 +1224,8 @@ void CPUDisassembly::binaryPasteSlot() | ||||||
| 
 | 
 | ||||||
| void CPUDisassembly::undoSelectionSlot() | void CPUDisassembly::undoSelectionSlot() | ||||||
| { | { | ||||||
|     int_t start = rvaToVa(getSelectionStart()); |     dsint start = rvaToVa(getSelectionStart()); | ||||||
|     int_t end = rvaToVa(getSelectionEnd()); |     dsint end = rvaToVa(getSelectionEnd()); | ||||||
|     if(!DbgFunctions()->PatchInRange(start, end)) //nothing patched in selected range
 |     if(!DbgFunctions()->PatchInRange(start, end)) //nothing patched in selected range
 | ||||||
|         return; |         return; | ||||||
|     DbgFunctions()->PatchRestoreRange(start, end); |     DbgFunctions()->PatchRestoreRange(start, end); | ||||||
|  | @ -1235,8 +1235,8 @@ void CPUDisassembly::undoSelectionSlot() | ||||||
| void CPUDisassembly::binaryPasteIgnoreSizeSlot() | void CPUDisassembly::binaryPasteIgnoreSizeSlot() | ||||||
| { | { | ||||||
|     HexEditDialog hexEdit(this); |     HexEditDialog hexEdit(this); | ||||||
|     int_t selStart = getSelectionStart(); |     dsint selStart = getSelectionStart(); | ||||||
|     int_t selSize = getSelectionEnd() - selStart + 1; |     dsint selSize = getSelectionEnd() - selStart + 1; | ||||||
|     QClipboard* clipboard = QApplication::clipboard(); |     QClipboard* clipboard = QApplication::clipboard(); | ||||||
|     hexEdit.mHexEdit->setData(clipboard->text()); |     hexEdit.mHexEdit->setData(clipboard->text()); | ||||||
| 
 | 
 | ||||||
|  | @ -1258,7 +1258,7 @@ void CPUDisassembly::yaraSlot() | ||||||
|     YaraRuleSelectionDialog yaraDialog(this); |     YaraRuleSelectionDialog yaraDialog(this); | ||||||
|     if(yaraDialog.exec() == QDialog::Accepted) |     if(yaraDialog.exec() == QDialog::Accepted) | ||||||
|     { |     { | ||||||
|         QString addrText = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         QString addrText = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|         DbgCmdExec(QString("yara \"%0\",%1").arg(yaraDialog.getSelectedFile()).arg(addrText).toUtf8().constData()); |         DbgCmdExec(QString("yara \"%0\",%1").arg(yaraDialog.getSelectedFile()).arg(addrText).toUtf8().constData()); | ||||||
|         emit displayReferencesWidget(); |         emit displayReferencesWidget(); | ||||||
|     } |     } | ||||||
|  | @ -1276,7 +1276,7 @@ void CPUDisassembly::copySelection(bool copyBytes) | ||||||
|     { |     { | ||||||
|         if(i) |         if(i) | ||||||
|             clipboard += "\r\n"; |             clipboard += "\r\n"; | ||||||
|         int_t cur_addr = rvaToVa(instBuffer.at(i).rva); |         dsint cur_addr = rvaToVa(instBuffer.at(i).rva); | ||||||
|         QString address = getAddrText(cur_addr, 0); |         QString address = getAddrText(cur_addr, 0); | ||||||
|         QString bytes; |         QString bytes; | ||||||
|         for(int j = 0; j < instBuffer.at(i).dump.size(); j++) |         for(int j = 0; j < instBuffer.at(i).dump.size(); j++) | ||||||
|  | @ -1318,14 +1318,14 @@ void CPUDisassembly::copySelectionNoBytes() | ||||||
| 
 | 
 | ||||||
| void CPUDisassembly::copyAddress() | void CPUDisassembly::copyAddress() | ||||||
| { | { | ||||||
|     QString addrText = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addrText = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     Bridge::CopyToClipboard(addrText); |     Bridge::CopyToClipboard(addrText); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDisassembly::copyRva() | void CPUDisassembly::copyRva() | ||||||
| { | { | ||||||
|     uint_t addr = rvaToVa(getInitialSelection()); |     duint addr = rvaToVa(getInitialSelection()); | ||||||
|     uint_t base = DbgFunctions()->ModBaseFromAddr(addr); |     duint base = DbgFunctions()->ModBaseFromAddr(addr); | ||||||
|     if(base) |     if(base) | ||||||
|     { |     { | ||||||
|         QString addrText = QString("%1").arg(addr - base, 0, 16, QChar('0')).toUpper(); |         QString addrText = QString("%1").arg(addr - base, 0, 16, QChar('0')).toUpper(); | ||||||
|  | @ -1368,7 +1368,7 @@ void CPUDisassembly::findCommand() | ||||||
|     char error[MAX_ERROR_SIZE] = ""; |     char error[MAX_ERROR_SIZE] = ""; | ||||||
|     unsigned char dest[16]; |     unsigned char dest[16]; | ||||||
|     int asmsize = 0; |     int asmsize = 0; | ||||||
|     uint_t va = rvaToVa(getInitialSelection()); |     duint va = rvaToVa(getInitialSelection()); | ||||||
| 
 | 
 | ||||||
|     if(!DbgFunctions()->Assemble(va + mMemPage->getSize() / 2, dest, &asmsize, mLineEdit.editText.toUtf8().constData(), error)) |     if(!DbgFunctions()->Assemble(va + mMemPage->getSize() / 2, dest, &asmsize, mLineEdit.editText.toUtf8().constData(), error)) | ||||||
|     { |     { | ||||||
|  | @ -1380,11 +1380,11 @@ void CPUDisassembly::findCommand() | ||||||
|         return; |         return; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     QString addr_text = QString("%1").arg(va, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addr_text = QString("%1").arg(va, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
| 
 | 
 | ||||||
|     if(!mLineEdit.bChecked) |     if(!mLineEdit.bChecked) | ||||||
|     { |     { | ||||||
|         int_t size = mMemPage->getSize(); |         dsint size = mMemPage->getSize(); | ||||||
|         DbgCmdExec(QString("findasm \"%1\", %2, .%3").arg(mLineEdit.editText).arg(addr_text).arg(size).toUtf8().constData()); |         DbgCmdExec(QString("findasm \"%1\", %2, .%3").arg(mLineEdit.editText).arg(addr_text).arg(size).toUtf8().constData()); | ||||||
|     } |     } | ||||||
|     else |     else | ||||||
|  | @ -1405,15 +1405,15 @@ void CPUDisassembly::openSource() | ||||||
| 
 | 
 | ||||||
| void CPUDisassembly::decompileSelection() | void CPUDisassembly::decompileSelection() | ||||||
| { | { | ||||||
|     int_t addr = rvaToVa(getSelectionStart()); |     dsint addr = rvaToVa(getSelectionStart()); | ||||||
|     int_t size = getSelectionSize(); |     dsint size = getSelectionSize(); | ||||||
|     emit displaySnowmanWidget(); |     emit displaySnowmanWidget(); | ||||||
|     emit decompileAt(addr, addr + size); |     emit decompileAt(addr, addr + size); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDisassembly::decompileFunction() | void CPUDisassembly::decompileFunction() | ||||||
| { | { | ||||||
|     int_t addr = rvaToVa(getInitialSelection()); |     dsint addr = rvaToVa(getInitialSelection()); | ||||||
|     duint start; |     duint start; | ||||||
|     duint end; |     duint end; | ||||||
|     if(DbgFunctionGet(addr, &start, &end)) |     if(DbgFunctionGet(addr, &start, &end)) | ||||||
|  |  | ||||||
|  | @ -18,9 +18,9 @@ public: | ||||||
| 
 | 
 | ||||||
|     // Context Menu Management
 |     // Context Menu Management
 | ||||||
|     void setupRightClickContextMenu(); |     void setupRightClickContextMenu(); | ||||||
|     void addFollowReferenceMenuItem(QString name, int_t value, QMenu* menu, bool isReferences); |     void addFollowReferenceMenuItem(QString name, dsint value, QMenu* menu, bool isReferences); | ||||||
|     void setupFollowReferenceMenu(int_t wVA, QMenu* menu, bool isReferences); |     void setupFollowReferenceMenu(dsint wVA, QMenu* menu, bool isReferences); | ||||||
|     void setHwBpAt(uint_t va, int slot); |     void setHwBpAt(duint va, int slot); | ||||||
| 
 | 
 | ||||||
|     void copySelection(bool copyBytes); |     void copySelection(bool copyBytes); | ||||||
| 
 | 
 | ||||||
|  | @ -28,7 +28,7 @@ signals: | ||||||
|     void displayReferencesWidget(); |     void displayReferencesWidget(); | ||||||
|     void displaySourceManagerWidget(); |     void displaySourceManagerWidget(); | ||||||
|     void showPatches(); |     void showPatches(); | ||||||
|     void decompileAt(int_t start, int_t end); |     void decompileAt(dsint start, dsint end); | ||||||
|     void displaySnowmanWidget(); |     void displaySnowmanWidget(); | ||||||
| 
 | 
 | ||||||
| public slots: | public slots: | ||||||
|  |  | ||||||
|  | @ -76,7 +76,7 @@ CPUDump::CPUDump(CPUDisassembly* disas, QWidget* parent) : HexDump(parent) | ||||||
|         break; |         break; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     connect(Bridge::getBridge(), SIGNAL(dumpAt(int_t)), this, SLOT(printDumpAt(int_t))); |     connect(Bridge::getBridge(), SIGNAL(dumpAt(dsint)), this, SLOT(printDumpAt(dsint))); | ||||||
|     connect(Bridge::getBridge(), SIGNAL(selectionDumpGet(SELECTIONDATA*)), this, SLOT(selectionGet(SELECTIONDATA*))); |     connect(Bridge::getBridge(), SIGNAL(selectionDumpGet(SELECTIONDATA*)), this, SLOT(selectionGet(SELECTIONDATA*))); | ||||||
|     connect(Bridge::getBridge(), SIGNAL(selectionDumpSet(const SELECTIONDATA*)), this, SLOT(selectionSet(const SELECTIONDATA*))); |     connect(Bridge::getBridge(), SIGNAL(selectionDumpSet(const SELECTIONDATA*)), this, SLOT(selectionSet(const SELECTIONDATA*))); | ||||||
|     connect(this, SIGNAL(selectionUpdated()), this, SLOT(selectionUpdatedSlot())); |     connect(this, SIGNAL(selectionUpdated()), this, SLOT(selectionUpdatedSlot())); | ||||||
|  | @ -441,7 +441,7 @@ void CPUDump::refreshShortcutsSlot() | ||||||
|     mCopyAddress->setShortcut(ConfigShortcut("ActionCopyAddress")); |     mCopyAddress->setShortcut(ConfigShortcut("ActionCopyAddress")); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| QString CPUDump::paintContent(QPainter* painter, int_t rowBase, int rowOffset, int col, int x, int y, int w, int h) | QString CPUDump::paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h) | ||||||
| { | { | ||||||
|     // Reset byte offset when base address is reached
 |     // Reset byte offset when base address is reached
 | ||||||
|     if(rowBase == 0 && mByteOffset != 0) |     if(rowBase == 0 && mByteOffset != 0) | ||||||
|  | @ -452,10 +452,10 @@ QString CPUDump::paintContent(QPainter* painter, int_t rowBase, int rowOffset, i | ||||||
|     { |     { | ||||||
|         char label[MAX_LABEL_SIZE] = ""; |         char label[MAX_LABEL_SIZE] = ""; | ||||||
|         QString addrText = ""; |         QString addrText = ""; | ||||||
|         int_t cur_addr = rvaToVa((rowBase + rowOffset) * getBytePerRowCount() - mByteOffset); |         dsint cur_addr = rvaToVa((rowBase + rowOffset) * getBytePerRowCount() - mByteOffset); | ||||||
|         if(mRvaDisplayEnabled) //RVA display
 |         if(mRvaDisplayEnabled) //RVA display
 | ||||||
|         { |         { | ||||||
|             int_t rva = cur_addr - mRvaDisplayBase; |             dsint rva = cur_addr - mRvaDisplayBase; | ||||||
|             if(rva == 0) |             if(rva == 0) | ||||||
|             { |             { | ||||||
| #ifdef _WIN64 | #ifdef _WIN64 | ||||||
|  | @ -481,7 +481,7 @@ QString CPUDump::paintContent(QPainter* painter, int_t rowBase, int rowOffset, i | ||||||
| #endif //_WIN64
 | #endif //_WIN64
 | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         addrText += QString("%1").arg(cur_addr, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         addrText += QString("%1").arg(cur_addr, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|         if(DbgGetLabelAt(cur_addr, SEG_DEFAULT, label)) //has label
 |         if(DbgGetLabelAt(cur_addr, SEG_DEFAULT, label)) //has label
 | ||||||
|         { |         { | ||||||
|             char module[MAX_MODULE_SIZE] = ""; |             char module[MAX_MODULE_SIZE] = ""; | ||||||
|  | @ -510,9 +510,9 @@ QString CPUDump::paintContent(QPainter* painter, int_t rowBase, int rowOffset, i | ||||||
|     } |     } | ||||||
|     else if(col && mDescriptor.at(col - 1).isData == false && mDescriptor.at(col - 1).itemCount == 1) //print comments
 |     else if(col && mDescriptor.at(col - 1).isData == false && mDescriptor.at(col - 1).itemCount == 1) //print comments
 | ||||||
|     { |     { | ||||||
|         uint_t data = 0; |         duint data = 0; | ||||||
|         int_t wRva = (rowBase + rowOffset) * getBytePerRowCount() - mByteOffset; |         dsint wRva = (rowBase + rowOffset) * getBytePerRowCount() - mByteOffset; | ||||||
|         mMemPage->read((byte_t*)&data, wRva, sizeof(uint_t)); |         mMemPage->read((byte_t*)&data, wRva, sizeof(duint)); | ||||||
|         char modname[MAX_MODULE_SIZE] = ""; |         char modname[MAX_MODULE_SIZE] = ""; | ||||||
|         if(!DbgGetModuleAt(data, modname)) |         if(!DbgGetModuleAt(data, modname)) | ||||||
|             modname[0] = '\0'; |             modname[0] = '\0'; | ||||||
|  | @ -532,21 +532,21 @@ void CPUDump::contextMenuEvent(QContextMenuEvent* event) | ||||||
|     if(!DbgIsDebugging()) |     if(!DbgIsDebugging()) | ||||||
|         return; |         return; | ||||||
| 
 | 
 | ||||||
|     int_t selectedAddr = rvaToVa(getInitialSelection()); |     dsint selectedAddr = rvaToVa(getInitialSelection()); | ||||||
| 
 | 
 | ||||||
|     QMenu* wMenu = new QMenu(this); //create context menu
 |     QMenu* wMenu = new QMenu(this); //create context menu
 | ||||||
|     wMenu->addMenu(mBinaryMenu); |     wMenu->addMenu(mBinaryMenu); | ||||||
|     wMenu->addMenu(mCopyMenu); |     wMenu->addMenu(mCopyMenu); | ||||||
|     int_t start = rvaToVa(getSelectionStart()); |     dsint start = rvaToVa(getSelectionStart()); | ||||||
|     int_t end = rvaToVa(getSelectionEnd()); |     dsint end = rvaToVa(getSelectionEnd()); | ||||||
|     if(DbgFunctions()->PatchInRange(start, end)) //nothing patched in selected range
 |     if(DbgFunctions()->PatchInRange(start, end)) //nothing patched in selected range
 | ||||||
|         wMenu->addAction(mUndoSelection); |         wMenu->addAction(mUndoSelection); | ||||||
|     if(DbgMemIsValidReadPtr(start) && DbgMemFindBaseAddr(start, 0) == DbgMemFindBaseAddr(DbgValFromString("csp"), 0)) |     if(DbgMemIsValidReadPtr(start) && DbgMemFindBaseAddr(start, 0) == DbgMemFindBaseAddr(DbgValFromString("csp"), 0)) | ||||||
|         wMenu->addAction(mFollowStack); |         wMenu->addAction(mFollowStack); | ||||||
|     wMenu->addAction(mFollowInDisasm); |     wMenu->addAction(mFollowInDisasm); | ||||||
| 
 | 
 | ||||||
|     uint_t ptr = 0; |     duint ptr = 0; | ||||||
|     DbgMemRead(selectedAddr, (unsigned char*)&ptr, sizeof(uint_t)); |     DbgMemRead(selectedAddr, (unsigned char*)&ptr, sizeof(duint)); | ||||||
|     if(DbgMemIsValidReadPtr(ptr)) |     if(DbgMemIsValidReadPtr(ptr)) | ||||||
|     { |     { | ||||||
|         wMenu->addAction(mFollowData); |         wMenu->addAction(mFollowData); | ||||||
|  | @ -614,10 +614,10 @@ void CPUDump::mouseDoubleClickEvent(QMouseEvent* event) | ||||||
|     case 0: //address
 |     case 0: //address
 | ||||||
|     { |     { | ||||||
|         //very ugly way to calculate the base of the current row (no clue why it works)
 |         //very ugly way to calculate the base of the current row (no clue why it works)
 | ||||||
|         int_t deltaRowBase = getInitialSelection() % getBytePerRowCount() + mByteOffset; |         dsint deltaRowBase = getInitialSelection() % getBytePerRowCount() + mByteOffset; | ||||||
|         if(deltaRowBase >= getBytePerRowCount()) |         if(deltaRowBase >= getBytePerRowCount()) | ||||||
|             deltaRowBase -= getBytePerRowCount(); |             deltaRowBase -= getBytePerRowCount(); | ||||||
|         int_t mSelectedVa = rvaToVa(getInitialSelection() - deltaRowBase); |         dsint mSelectedVa = rvaToVa(getInitialSelection() - deltaRowBase); | ||||||
|         if(mRvaDisplayEnabled && mSelectedVa == mRvaDisplayBase) |         if(mRvaDisplayEnabled && mSelectedVa == mRvaDisplayBase) | ||||||
|             mRvaDisplayEnabled = false; |             mRvaDisplayEnabled = false; | ||||||
|         else |         else | ||||||
|  | @ -643,9 +643,9 @@ void CPUDump::setLabelSlot() | ||||||
|     if(!DbgIsDebugging()) |     if(!DbgIsDebugging()) | ||||||
|         return; |         return; | ||||||
| 
 | 
 | ||||||
|     uint_t wVA = rvaToVa(getSelectionStart()); |     duint wVA = rvaToVa(getSelectionStart()); | ||||||
|     LineEditDialog mLineEdit(this); |     LineEditDialog mLineEdit(this); | ||||||
|     QString addr_text = QString("%1").arg(wVA, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addr_text = QString("%1").arg(wVA, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     char label_text[MAX_COMMENT_SIZE] = ""; |     char label_text[MAX_COMMENT_SIZE] = ""; | ||||||
|     if(DbgGetLabelAt((duint)wVA, SEG_DEFAULT, label_text)) |     if(DbgGetLabelAt((duint)wVA, SEG_DEFAULT, label_text)) | ||||||
|         mLineEdit.setText(QString(label_text)); |         mLineEdit.setText(QString(label_text)); | ||||||
|  | @ -693,26 +693,26 @@ void CPUDump::gotoFileOffsetSlot() | ||||||
|     mGotoDialog.setWindowTitle("Goto File Offset in " + QString(modname)); |     mGotoDialog.setWindowTitle("Goto File Offset in " + QString(modname)); | ||||||
|     if(mGotoDialog.exec() != QDialog::Accepted) |     if(mGotoDialog.exec() != QDialog::Accepted) | ||||||
|         return; |         return; | ||||||
|     uint_t value = DbgValFromString(mGotoDialog.expressionText.toUtf8().constData()); |     duint value = DbgValFromString(mGotoDialog.expressionText.toUtf8().constData()); | ||||||
|     value = DbgFunctions()->FileOffsetToVa(modname, value); |     value = DbgFunctions()->FileOffsetToVa(modname, value); | ||||||
|     DbgCmdExec(QString().sprintf("dump \"%p\"", value).toUtf8().constData()); |     DbgCmdExec(QString().sprintf("dump \"%p\"", value).toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDump::gotoStartSlot() | void CPUDump::gotoStartSlot() | ||||||
| { | { | ||||||
|     uint_t dest = mMemPage->getBase(); |     duint dest = mMemPage->getBase(); | ||||||
|     DbgCmdExec(QString().sprintf("dump \"%p\"", dest).toUtf8().constData()); |     DbgCmdExec(QString().sprintf("dump \"%p\"", dest).toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDump::gotoEndSlot() | void CPUDump::gotoEndSlot() | ||||||
| { | { | ||||||
|     uint_t dest = mMemPage->getBase() + mMemPage->getSize() - (getViewableRowsCount() * getBytePerRowCount()); |     duint dest = mMemPage->getBase() + mMemPage->getSize() - (getViewableRowsCount() * getBytePerRowCount()); | ||||||
|     DbgCmdExec(QString().sprintf("dump \"%p\"", dest).toUtf8().constData()); |     DbgCmdExec(QString().sprintf("dump \"%p\"", dest).toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDump::hexAsciiSlot() | void CPUDump::hexAsciiSlot() | ||||||
| { | { | ||||||
|     Config()->setUint("HexDump", "DefaultView", (uint_t)ViewHexAscii); |     Config()->setUint("HexDump", "DefaultView", (duint)ViewHexAscii); | ||||||
|     int charwidth = getCharWidth(); |     int charwidth = getCharWidth(); | ||||||
|     ColumnDescriptor_t wColDesc; |     ColumnDescriptor_t wColDesc; | ||||||
|     DataDescriptor_t dDesc; |     DataDescriptor_t dDesc; | ||||||
|  | @ -746,7 +746,7 @@ void CPUDump::hexAsciiSlot() | ||||||
| 
 | 
 | ||||||
| void CPUDump::hexUnicodeSlot() | void CPUDump::hexUnicodeSlot() | ||||||
| { | { | ||||||
|     Config()->setUint("HexDump", "DefaultView", (uint_t)ViewHexUnicode); |     Config()->setUint("HexDump", "DefaultView", (duint)ViewHexUnicode); | ||||||
|     int charwidth = getCharWidth(); |     int charwidth = getCharWidth(); | ||||||
|     ColumnDescriptor_t wColDesc; |     ColumnDescriptor_t wColDesc; | ||||||
|     DataDescriptor_t dDesc; |     DataDescriptor_t dDesc; | ||||||
|  | @ -780,7 +780,7 @@ void CPUDump::hexUnicodeSlot() | ||||||
| 
 | 
 | ||||||
| void CPUDump::textAsciiSlot() | void CPUDump::textAsciiSlot() | ||||||
| { | { | ||||||
|     Config()->setUint("HexDump", "DefaultView", (uint_t)ViewTextAscii); |     Config()->setUint("HexDump", "DefaultView", (duint)ViewTextAscii); | ||||||
|     int charwidth = getCharWidth(); |     int charwidth = getCharWidth(); | ||||||
|     ColumnDescriptor_t wColDesc; |     ColumnDescriptor_t wColDesc; | ||||||
|     DataDescriptor_t dDesc; |     DataDescriptor_t dDesc; | ||||||
|  | @ -806,7 +806,7 @@ void CPUDump::textAsciiSlot() | ||||||
| 
 | 
 | ||||||
| void CPUDump::textUnicodeSlot() | void CPUDump::textUnicodeSlot() | ||||||
| { | { | ||||||
|     Config()->setUint("HexDump", "DefaultView", (uint_t)ViewTextUnicode); |     Config()->setUint("HexDump", "DefaultView", (duint)ViewTextUnicode); | ||||||
|     int charwidth = getCharWidth(); |     int charwidth = getCharWidth(); | ||||||
|     ColumnDescriptor_t wColDesc; |     ColumnDescriptor_t wColDesc; | ||||||
|     DataDescriptor_t dDesc; |     DataDescriptor_t dDesc; | ||||||
|  | @ -832,7 +832,7 @@ void CPUDump::textUnicodeSlot() | ||||||
| 
 | 
 | ||||||
| void CPUDump::integerSignedShortSlot() | void CPUDump::integerSignedShortSlot() | ||||||
| { | { | ||||||
|     Config()->setUint("HexDump", "DefaultView", (uint_t)ViewIntegerSignedShort); |     Config()->setUint("HexDump", "DefaultView", (duint)ViewIntegerSignedShort); | ||||||
|     int charwidth = getCharWidth(); |     int charwidth = getCharWidth(); | ||||||
|     ColumnDescriptor_t wColDesc; |     ColumnDescriptor_t wColDesc; | ||||||
|     DataDescriptor_t dDesc; |     DataDescriptor_t dDesc; | ||||||
|  | @ -857,7 +857,7 @@ void CPUDump::integerSignedShortSlot() | ||||||
| 
 | 
 | ||||||
| void CPUDump::integerSignedLongSlot() | void CPUDump::integerSignedLongSlot() | ||||||
| { | { | ||||||
|     Config()->setUint("HexDump", "DefaultView", (uint_t)ViewIntegerSignedLong); |     Config()->setUint("HexDump", "DefaultView", (duint)ViewIntegerSignedLong); | ||||||
|     int charwidth = getCharWidth(); |     int charwidth = getCharWidth(); | ||||||
|     ColumnDescriptor_t wColDesc; |     ColumnDescriptor_t wColDesc; | ||||||
|     DataDescriptor_t dDesc; |     DataDescriptor_t dDesc; | ||||||
|  | @ -882,7 +882,7 @@ void CPUDump::integerSignedLongSlot() | ||||||
| 
 | 
 | ||||||
| void CPUDump::integerSignedLongLongSlot() | void CPUDump::integerSignedLongLongSlot() | ||||||
| { | { | ||||||
|     Config()->setUint("HexDump", "DefaultView", (uint_t)ViewIntegerSignedLongLong); |     Config()->setUint("HexDump", "DefaultView", (duint)ViewIntegerSignedLongLong); | ||||||
|     int charwidth = getCharWidth(); |     int charwidth = getCharWidth(); | ||||||
|     ColumnDescriptor_t wColDesc; |     ColumnDescriptor_t wColDesc; | ||||||
|     DataDescriptor_t dDesc; |     DataDescriptor_t dDesc; | ||||||
|  | @ -907,7 +907,7 @@ void CPUDump::integerSignedLongLongSlot() | ||||||
| 
 | 
 | ||||||
| void CPUDump::integerUnsignedShortSlot() | void CPUDump::integerUnsignedShortSlot() | ||||||
| { | { | ||||||
|     Config()->setUint("HexDump", "DefaultView", (uint_t)ViewIntegerUnsignedShort); |     Config()->setUint("HexDump", "DefaultView", (duint)ViewIntegerUnsignedShort); | ||||||
|     int charwidth = getCharWidth(); |     int charwidth = getCharWidth(); | ||||||
|     ColumnDescriptor_t wColDesc; |     ColumnDescriptor_t wColDesc; | ||||||
|     DataDescriptor_t dDesc; |     DataDescriptor_t dDesc; | ||||||
|  | @ -932,7 +932,7 @@ void CPUDump::integerUnsignedShortSlot() | ||||||
| 
 | 
 | ||||||
| void CPUDump::integerUnsignedLongSlot() | void CPUDump::integerUnsignedLongSlot() | ||||||
| { | { | ||||||
|     Config()->setUint("HexDump", "DefaultView", (uint_t)ViewIntegerUnsignedLong); |     Config()->setUint("HexDump", "DefaultView", (duint)ViewIntegerUnsignedLong); | ||||||
|     int charwidth = getCharWidth(); |     int charwidth = getCharWidth(); | ||||||
|     ColumnDescriptor_t wColDesc; |     ColumnDescriptor_t wColDesc; | ||||||
|     DataDescriptor_t dDesc; |     DataDescriptor_t dDesc; | ||||||
|  | @ -957,7 +957,7 @@ void CPUDump::integerUnsignedLongSlot() | ||||||
| 
 | 
 | ||||||
| void CPUDump::integerUnsignedLongLongSlot() | void CPUDump::integerUnsignedLongLongSlot() | ||||||
| { | { | ||||||
|     Config()->setUint("HexDump", "DefaultView", (uint_t)ViewIntegerUnsignedLongLong); |     Config()->setUint("HexDump", "DefaultView", (duint)ViewIntegerUnsignedLongLong); | ||||||
|     int charwidth = getCharWidth(); |     int charwidth = getCharWidth(); | ||||||
|     ColumnDescriptor_t wColDesc; |     ColumnDescriptor_t wColDesc; | ||||||
|     DataDescriptor_t dDesc; |     DataDescriptor_t dDesc; | ||||||
|  | @ -982,7 +982,7 @@ void CPUDump::integerUnsignedLongLongSlot() | ||||||
| 
 | 
 | ||||||
| void CPUDump::integerHexShortSlot() | void CPUDump::integerHexShortSlot() | ||||||
| { | { | ||||||
|     Config()->setUint("HexDump", "DefaultView", (uint_t)ViewIntegerHexShort); |     Config()->setUint("HexDump", "DefaultView", (duint)ViewIntegerHexShort); | ||||||
|     int charwidth = getCharWidth(); |     int charwidth = getCharWidth(); | ||||||
|     ColumnDescriptor_t wColDesc; |     ColumnDescriptor_t wColDesc; | ||||||
|     DataDescriptor_t dDesc; |     DataDescriptor_t dDesc; | ||||||
|  | @ -1007,7 +1007,7 @@ void CPUDump::integerHexShortSlot() | ||||||
| 
 | 
 | ||||||
| void CPUDump::integerHexLongSlot() | void CPUDump::integerHexLongSlot() | ||||||
| { | { | ||||||
|     Config()->setUint("HexDump", "DefaultView", (uint_t)ViewIntegerHexLong); |     Config()->setUint("HexDump", "DefaultView", (duint)ViewIntegerHexLong); | ||||||
|     int charwidth = getCharWidth(); |     int charwidth = getCharWidth(); | ||||||
|     ColumnDescriptor_t wColDesc; |     ColumnDescriptor_t wColDesc; | ||||||
|     DataDescriptor_t dDesc; |     DataDescriptor_t dDesc; | ||||||
|  | @ -1032,7 +1032,7 @@ void CPUDump::integerHexLongSlot() | ||||||
| 
 | 
 | ||||||
| void CPUDump::integerHexLongLongSlot() | void CPUDump::integerHexLongLongSlot() | ||||||
| { | { | ||||||
|     Config()->setUint("HexDump", "DefaultView", (uint_t)ViewIntegerHexLongLong); |     Config()->setUint("HexDump", "DefaultView", (duint)ViewIntegerHexLongLong); | ||||||
|     int charwidth = getCharWidth(); |     int charwidth = getCharWidth(); | ||||||
|     ColumnDescriptor_t wColDesc; |     ColumnDescriptor_t wColDesc; | ||||||
|     DataDescriptor_t dDesc; |     DataDescriptor_t dDesc; | ||||||
|  | @ -1057,7 +1057,7 @@ void CPUDump::integerHexLongLongSlot() | ||||||
| 
 | 
 | ||||||
| void CPUDump::floatFloatSlot() | void CPUDump::floatFloatSlot() | ||||||
| { | { | ||||||
|     Config()->setUint("HexDump", "DefaultView", (uint_t)ViewFloatFloat); |     Config()->setUint("HexDump", "DefaultView", (duint)ViewFloatFloat); | ||||||
|     int charwidth = getCharWidth(); |     int charwidth = getCharWidth(); | ||||||
|     ColumnDescriptor_t wColDesc; |     ColumnDescriptor_t wColDesc; | ||||||
|     DataDescriptor_t dDesc; |     DataDescriptor_t dDesc; | ||||||
|  | @ -1082,7 +1082,7 @@ void CPUDump::floatFloatSlot() | ||||||
| 
 | 
 | ||||||
| void CPUDump::floatDoubleSlot() | void CPUDump::floatDoubleSlot() | ||||||
| { | { | ||||||
|     Config()->setUint("HexDump", "DefaultView", (uint_t)ViewFloatDouble); |     Config()->setUint("HexDump", "DefaultView", (duint)ViewFloatDouble); | ||||||
|     int charwidth = getCharWidth(); |     int charwidth = getCharWidth(); | ||||||
|     ColumnDescriptor_t wColDesc; |     ColumnDescriptor_t wColDesc; | ||||||
|     DataDescriptor_t dDesc; |     DataDescriptor_t dDesc; | ||||||
|  | @ -1107,7 +1107,7 @@ void CPUDump::floatDoubleSlot() | ||||||
| 
 | 
 | ||||||
| void CPUDump::floatLongDoubleSlot() | void CPUDump::floatLongDoubleSlot() | ||||||
| { | { | ||||||
|     Config()->setUint("HexDump", "DefaultView", (uint_t)ViewFloatLongDouble); |     Config()->setUint("HexDump", "DefaultView", (duint)ViewFloatLongDouble); | ||||||
|     int charwidth = getCharWidth(); |     int charwidth = getCharWidth(); | ||||||
|     ColumnDescriptor_t wColDesc; |     ColumnDescriptor_t wColDesc; | ||||||
|     DataDescriptor_t dDesc; |     DataDescriptor_t dDesc; | ||||||
|  | @ -1132,7 +1132,7 @@ void CPUDump::floatLongDoubleSlot() | ||||||
| 
 | 
 | ||||||
| void CPUDump::addressSlot() | void CPUDump::addressSlot() | ||||||
| { | { | ||||||
|     Config()->setUint("HexDump", "DefaultView", (uint_t)ViewAddress); |     Config()->setUint("HexDump", "DefaultView", (duint)ViewAddress); | ||||||
|     int charwidth = getCharWidth(); |     int charwidth = getCharWidth(); | ||||||
|     ColumnDescriptor_t wColDesc; |     ColumnDescriptor_t wColDesc; | ||||||
|     DataDescriptor_t dDesc; |     DataDescriptor_t dDesc; | ||||||
|  | @ -1147,7 +1147,7 @@ void CPUDump::addressSlot() | ||||||
|     wColDesc.data.itemSize = Dword; |     wColDesc.data.itemSize = Dword; | ||||||
|     wColDesc.data.dwordMode = HexDword; |     wColDesc.data.dwordMode = HexDword; | ||||||
| #endif | #endif | ||||||
|     appendResetDescriptor(8 + charwidth * 2 * sizeof(uint_t), "Address", false, wColDesc); |     appendResetDescriptor(8 + charwidth * 2 * sizeof(duint), "Address", false, wColDesc); | ||||||
| 
 | 
 | ||||||
|     wColDesc.isData = false; //comments
 |     wColDesc.isData = false; //comments
 | ||||||
|     wColDesc.itemCount = 1; |     wColDesc.itemCount = 1; | ||||||
|  | @ -1178,10 +1178,10 @@ void CPUDump::selectionGet(SELECTIONDATA* selection) | ||||||
| 
 | 
 | ||||||
| void CPUDump::selectionSet(const SELECTIONDATA* selection) | void CPUDump::selectionSet(const SELECTIONDATA* selection) | ||||||
| { | { | ||||||
|     int_t selMin = mMemPage->getBase(); |     dsint selMin = mMemPage->getBase(); | ||||||
|     int_t selMax = selMin + mMemPage->getSize(); |     dsint selMax = selMin + mMemPage->getSize(); | ||||||
|     int_t start = selection->start; |     dsint start = selection->start; | ||||||
|     int_t end = selection->end; |     dsint end = selection->end; | ||||||
|     if(start < selMin || start >= selMax || end < selMin || end >= selMax) //selection out of range
 |     if(start < selMin || start >= selMax || end < selMin || end >= selMax) //selection out of range
 | ||||||
|     { |     { | ||||||
|         Bridge::getBridge()->setResult(0); |         Bridge::getBridge()->setResult(0); | ||||||
|  | @ -1195,111 +1195,111 @@ void CPUDump::selectionSet(const SELECTIONDATA* selection) | ||||||
| 
 | 
 | ||||||
| void CPUDump::memoryAccessSingleshootSlot() | void CPUDump::memoryAccessSingleshootSlot() | ||||||
| { | { | ||||||
|     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("bpm " + addr_text + ", 0, r").toUtf8().constData()); |     DbgCmdExec(QString("bpm " + addr_text + ", 0, r").toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDump::memoryAccessRestoreSlot() | void CPUDump::memoryAccessRestoreSlot() | ||||||
| { | { | ||||||
|     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("bpm " + addr_text + ", 1, r").toUtf8().constData()); |     DbgCmdExec(QString("bpm " + addr_text + ", 1, r").toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDump::memoryWriteSingleshootSlot() | void CPUDump::memoryWriteSingleshootSlot() | ||||||
| { | { | ||||||
|     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("bpm " + addr_text + ", 0, w").toUtf8().constData()); |     DbgCmdExec(QString("bpm " + addr_text + ", 0, w").toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDump::memoryWriteRestoreSlot() | void CPUDump::memoryWriteRestoreSlot() | ||||||
| { | { | ||||||
|     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("bpm " + addr_text + ", 1, w").toUtf8().constData()); |     DbgCmdExec(QString("bpm " + addr_text + ", 1, w").toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDump::memoryExecuteSingleshootSlot() | void CPUDump::memoryExecuteSingleshootSlot() | ||||||
| { | { | ||||||
|     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("bpm " + addr_text + ", 0, x").toUtf8().constData()); |     DbgCmdExec(QString("bpm " + addr_text + ", 0, x").toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDump::memoryExecuteRestoreSlot() | void CPUDump::memoryExecuteRestoreSlot() | ||||||
| { | { | ||||||
|     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("bpm " + addr_text + ", 1, x").toUtf8().constData()); |     DbgCmdExec(QString("bpm " + addr_text + ", 1, x").toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDump::memoryRemoveSlot() | void CPUDump::memoryRemoveSlot() | ||||||
| { | { | ||||||
|     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("bpmc " + addr_text).toUtf8().constData()); |     DbgCmdExec(QString("bpmc " + addr_text).toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDump::hardwareAccess1Slot() | void CPUDump::hardwareAccess1Slot() | ||||||
| { | { | ||||||
|     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("bphws " + addr_text + ", r, 1").toUtf8().constData()); |     DbgCmdExec(QString("bphws " + addr_text + ", r, 1").toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDump::hardwareAccess2Slot() | void CPUDump::hardwareAccess2Slot() | ||||||
| { | { | ||||||
|     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("bphws " + addr_text + ", r, 2").toUtf8().constData()); |     DbgCmdExec(QString("bphws " + addr_text + ", r, 2").toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDump::hardwareAccess4Slot() | void CPUDump::hardwareAccess4Slot() | ||||||
| { | { | ||||||
|     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("bphws " + addr_text + ", r, 4").toUtf8().constData()); |     DbgCmdExec(QString("bphws " + addr_text + ", r, 4").toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDump::hardwareAccess8Slot() | void CPUDump::hardwareAccess8Slot() | ||||||
| { | { | ||||||
|     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("bphws " + addr_text + ", r, 8").toUtf8().constData()); |     DbgCmdExec(QString("bphws " + addr_text + ", r, 8").toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDump::hardwareWrite1Slot() | void CPUDump::hardwareWrite1Slot() | ||||||
| { | { | ||||||
|     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("bphws " + addr_text + ", w, 1").toUtf8().constData()); |     DbgCmdExec(QString("bphws " + addr_text + ", w, 1").toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDump::hardwareWrite2Slot() | void CPUDump::hardwareWrite2Slot() | ||||||
| { | { | ||||||
|     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("bphws " + addr_text + ", w, 2").toUtf8().constData()); |     DbgCmdExec(QString("bphws " + addr_text + ", w, 2").toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDump::hardwareWrite4Slot() | void CPUDump::hardwareWrite4Slot() | ||||||
| { | { | ||||||
|     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("bphws " + addr_text + ", w, 4").toUtf8().constData()); |     DbgCmdExec(QString("bphws " + addr_text + ", w, 4").toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDump::hardwareWrite8Slot() | void CPUDump::hardwareWrite8Slot() | ||||||
| { | { | ||||||
|     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("bphws " + addr_text + ", w, 8").toUtf8().constData()); |     DbgCmdExec(QString("bphws " + addr_text + ", w, 8").toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDump::hardwareExecuteSlot() | void CPUDump::hardwareExecuteSlot() | ||||||
| { | { | ||||||
|     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("bphws " + addr_text + ", x").toUtf8().constData()); |     DbgCmdExec(QString("bphws " + addr_text + ", x").toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDump::hardwareRemoveSlot() | void CPUDump::hardwareRemoveSlot() | ||||||
| { | { | ||||||
|     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addr_text = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("bphwc " + addr_text).toUtf8().constData()); |     DbgCmdExec(QString("bphwc " + addr_text).toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDump::findReferencesSlot() | void CPUDump::findReferencesSlot() | ||||||
| { | { | ||||||
|     QString addrStart = QString("%1").arg(rvaToVa(getSelectionStart()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addrStart = QString("%1").arg(rvaToVa(getSelectionStart()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     QString addrEnd = QString("%1").arg(rvaToVa(getSelectionEnd()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addrEnd = QString("%1").arg(rvaToVa(getSelectionEnd()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     QString addrDisasm = QString("%1").arg(mDisas->rvaToVa(mDisas->getSelectionStart()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addrDisasm = QString("%1").arg(mDisas->rvaToVa(mDisas->getSelectionStart()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("findrefrange " + addrStart + ", " + addrEnd + ", " + addrDisasm).toUtf8().constData()); |     DbgCmdExec(QString("findrefrange " + addrStart + ", " + addrEnd + ", " + addrDisasm).toUtf8().constData()); | ||||||
|     emit displayReferencesWidget(); |     emit displayReferencesWidget(); | ||||||
| } | } | ||||||
|  | @ -1307,17 +1307,17 @@ void CPUDump::findReferencesSlot() | ||||||
| void CPUDump::binaryEditSlot() | void CPUDump::binaryEditSlot() | ||||||
| { | { | ||||||
|     HexEditDialog hexEdit(this); |     HexEditDialog hexEdit(this); | ||||||
|     int_t selStart = getSelectionStart(); |     dsint selStart = getSelectionStart(); | ||||||
|     int_t selSize = getSelectionEnd() - selStart + 1; |     dsint selSize = getSelectionEnd() - selStart + 1; | ||||||
|     byte_t* data = new byte_t[selSize]; |     byte_t* data = new byte_t[selSize]; | ||||||
|     mMemPage->read(data, selStart, selSize); |     mMemPage->read(data, selStart, selSize); | ||||||
|     hexEdit.mHexEdit->setData(QByteArray((const char*)data, selSize)); |     hexEdit.mHexEdit->setData(QByteArray((const char*)data, selSize)); | ||||||
|     delete [] data; |     delete [] data; | ||||||
|     hexEdit.setWindowTitle("Edit data at " + QString("%1").arg(rvaToVa(selStart), sizeof(int_t) * 2, 16, QChar('0')).toUpper()); |     hexEdit.setWindowTitle("Edit data at " + QString("%1").arg(rvaToVa(selStart), sizeof(dsint) * 2, 16, QChar('0')).toUpper()); | ||||||
|     if(hexEdit.exec() != QDialog::Accepted) |     if(hexEdit.exec() != QDialog::Accepted) | ||||||
|         return; |         return; | ||||||
|     int_t dataSize = hexEdit.mHexEdit->data().size(); |     dsint dataSize = hexEdit.mHexEdit->data().size(); | ||||||
|     int_t newSize = selSize > dataSize ? selSize : dataSize; |     dsint newSize = selSize > dataSize ? selSize : dataSize; | ||||||
|     data = new byte_t[newSize]; |     data = new byte_t[newSize]; | ||||||
|     mMemPage->read(data, selStart, newSize); |     mMemPage->read(data, selStart, newSize); | ||||||
|     QByteArray patched = hexEdit.mHexEdit->applyMaskedData(QByteArray((const char*)data, newSize)); |     QByteArray patched = hexEdit.mHexEdit->applyMaskedData(QByteArray((const char*)data, newSize)); | ||||||
|  | @ -1329,12 +1329,12 @@ void CPUDump::binaryFillSlot() | ||||||
| { | { | ||||||
|     HexEditDialog hexEdit(this); |     HexEditDialog hexEdit(this); | ||||||
|     hexEdit.mHexEdit->setOverwriteMode(false); |     hexEdit.mHexEdit->setOverwriteMode(false); | ||||||
|     int_t selStart = getSelectionStart(); |     dsint selStart = getSelectionStart(); | ||||||
|     hexEdit.setWindowTitle("Fill data at " + QString("%1").arg(rvaToVa(selStart), sizeof(int_t) * 2, 16, QChar('0')).toUpper()); |     hexEdit.setWindowTitle("Fill data at " + QString("%1").arg(rvaToVa(selStart), sizeof(dsint) * 2, 16, QChar('0')).toUpper()); | ||||||
|     if(hexEdit.exec() != QDialog::Accepted) |     if(hexEdit.exec() != QDialog::Accepted) | ||||||
|         return; |         return; | ||||||
|     QString pattern = hexEdit.mHexEdit->pattern(); |     QString pattern = hexEdit.mHexEdit->pattern(); | ||||||
|     int_t selSize = getSelectionEnd() - selStart + 1; |     dsint selSize = getSelectionEnd() - selStart + 1; | ||||||
|     byte_t* data = new byte_t[selSize]; |     byte_t* data = new byte_t[selSize]; | ||||||
|     mMemPage->read(data, selStart, selSize); |     mMemPage->read(data, selStart, selSize); | ||||||
|     hexEdit.mHexEdit->setData(QByteArray((const char*)data, selSize)); |     hexEdit.mHexEdit->setData(QByteArray((const char*)data, selSize)); | ||||||
|  | @ -1348,8 +1348,8 @@ void CPUDump::binaryFillSlot() | ||||||
| void CPUDump::binaryCopySlot() | void CPUDump::binaryCopySlot() | ||||||
| { | { | ||||||
|     HexEditDialog hexEdit(this); |     HexEditDialog hexEdit(this); | ||||||
|     int_t selStart = getSelectionStart(); |     dsint selStart = getSelectionStart(); | ||||||
|     int_t selSize = getSelectionEnd() - selStart + 1; |     dsint selSize = getSelectionEnd() - selStart + 1; | ||||||
|     byte_t* data = new byte_t[selSize]; |     byte_t* data = new byte_t[selSize]; | ||||||
|     mMemPage->read(data, selStart, selSize); |     mMemPage->read(data, selStart, selSize); | ||||||
|     hexEdit.mHexEdit->setData(QByteArray((const char*)data, selSize)); |     hexEdit.mHexEdit->setData(QByteArray((const char*)data, selSize)); | ||||||
|  | @ -1360,8 +1360,8 @@ void CPUDump::binaryCopySlot() | ||||||
| void CPUDump::binaryPasteSlot() | void CPUDump::binaryPasteSlot() | ||||||
| { | { | ||||||
|     HexEditDialog hexEdit(this); |     HexEditDialog hexEdit(this); | ||||||
|     int_t selStart = getSelectionStart(); |     dsint selStart = getSelectionStart(); | ||||||
|     int_t selSize = getSelectionEnd() - selStart + 1; |     dsint selSize = getSelectionEnd() - selStart + 1; | ||||||
|     QClipboard* clipboard = QApplication::clipboard(); |     QClipboard* clipboard = QApplication::clipboard(); | ||||||
|     hexEdit.mHexEdit->setData(clipboard->text()); |     hexEdit.mHexEdit->setData(clipboard->text()); | ||||||
| 
 | 
 | ||||||
|  | @ -1377,8 +1377,8 @@ void CPUDump::binaryPasteSlot() | ||||||
| void CPUDump::binaryPasteIgnoreSizeSlot() | void CPUDump::binaryPasteIgnoreSizeSlot() | ||||||
| { | { | ||||||
|     HexEditDialog hexEdit(this); |     HexEditDialog hexEdit(this); | ||||||
|     int_t selStart = getSelectionStart(); |     dsint selStart = getSelectionStart(); | ||||||
|     int_t selSize = getSelectionEnd() - selStart + 1; |     dsint selSize = getSelectionEnd() - selStart + 1; | ||||||
|     QClipboard* clipboard = QApplication::clipboard(); |     QClipboard* clipboard = QApplication::clipboard(); | ||||||
|     hexEdit.mHexEdit->setData(clipboard->text()); |     hexEdit.mHexEdit->setData(clipboard->text()); | ||||||
| 
 | 
 | ||||||
|  | @ -1398,18 +1398,18 @@ void CPUDump::findPattern() | ||||||
|     hexEdit.setWindowTitle("Find Pattern..."); |     hexEdit.setWindowTitle("Find Pattern..."); | ||||||
|     if(hexEdit.exec() != QDialog::Accepted) |     if(hexEdit.exec() != QDialog::Accepted) | ||||||
|         return; |         return; | ||||||
|     int_t addr = rvaToVa(getSelectionStart()); |     dsint addr = rvaToVa(getSelectionStart()); | ||||||
|     if(hexEdit.entireBlock()) |     if(hexEdit.entireBlock()) | ||||||
|         addr = DbgMemFindBaseAddr(addr, 0); |         addr = DbgMemFindBaseAddr(addr, 0); | ||||||
|     QString addrText = QString("%1").arg(addr, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addrText = QString("%1").arg(addr, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("findall " + addrText + ", " + hexEdit.mHexEdit->pattern() + ", &data&").toUtf8().constData()); |     DbgCmdExec(QString("findall " + addrText + ", " + hexEdit.mHexEdit->pattern() + ", &data&").toUtf8().constData()); | ||||||
|     emit displayReferencesWidget(); |     emit displayReferencesWidget(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDump::undoSelectionSlot() | void CPUDump::undoSelectionSlot() | ||||||
| { | { | ||||||
|     int_t start = rvaToVa(getSelectionStart()); |     dsint start = rvaToVa(getSelectionStart()); | ||||||
|     int_t end = rvaToVa(getSelectionEnd()); |     dsint end = rvaToVa(getSelectionEnd()); | ||||||
|     if(!DbgFunctions()->PatchInRange(start, end)) //nothing patched in selected range
 |     if(!DbgFunctions()->PatchInRange(start, end)) //nothing patched in selected range
 | ||||||
|         return; |         return; | ||||||
|     DbgFunctions()->PatchRestoreRange(start, end); |     DbgFunctions()->PatchRestoreRange(start, end); | ||||||
|  | @ -1418,32 +1418,32 @@ void CPUDump::undoSelectionSlot() | ||||||
| 
 | 
 | ||||||
| void CPUDump::followStackSlot() | void CPUDump::followStackSlot() | ||||||
| { | { | ||||||
|     QString addrText = QString("%1").arg(rvaToVa(getSelectionStart()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addrText = QString("%1").arg(rvaToVa(getSelectionStart()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("sdump " + addrText).toUtf8().constData()); |     DbgCmdExec(QString("sdump " + addrText).toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDump::followInDisasmSlot() | void CPUDump::followInDisasmSlot() | ||||||
| { | { | ||||||
|     QString addrText = QString("%1").arg(rvaToVa(getSelectionStart()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addrText = QString("%1").arg(rvaToVa(getSelectionStart()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("disasm " + addrText).toUtf8().constData()); |     DbgCmdExec(QString("disasm " + addrText).toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDump::followDataSlot() | void CPUDump::followDataSlot() | ||||||
| { | { | ||||||
|     QString addrText = QString("%1").arg(rvaToVa(getSelectionStart()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addrText = QString("%1").arg(rvaToVa(getSelectionStart()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("disasm [%1]").arg(addrText).toUtf8().constData()); |     DbgCmdExec(QString("disasm [%1]").arg(addrText).toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDump::followDataDumpSlot() | void CPUDump::followDataDumpSlot() | ||||||
| { | { | ||||||
|     QString addrText = QString("%1").arg(rvaToVa(getSelectionStart()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addrText = QString("%1").arg(rvaToVa(getSelectionStart()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("dump [%1]").arg(addrText).toUtf8().constData()); |     DbgCmdExec(QString("dump [%1]").arg(addrText).toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDump::selectionUpdatedSlot() | void CPUDump::selectionUpdatedSlot() | ||||||
| { | { | ||||||
|     QString selStart = QString("%1").arg(rvaToVa(getSelectionStart()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString selStart = QString("%1").arg(rvaToVa(getSelectionStart()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     QString selEnd = QString("%1").arg(rvaToVa(getSelectionEnd()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString selEnd = QString("%1").arg(rvaToVa(getSelectionEnd()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     QString info = "Dump"; |     QString info = "Dump"; | ||||||
|     char mod[MAX_MODULE_SIZE] = ""; |     char mod[MAX_MODULE_SIZE] = ""; | ||||||
|     if(DbgFunctions()->ModNameFromAddr(rvaToVa(getSelectionStart()), mod, true)) |     if(DbgFunctions()->ModNameFromAddr(rvaToVa(getSelectionStart()), mod, true)) | ||||||
|  | @ -1456,7 +1456,7 @@ void CPUDump::yaraSlot() | ||||||
|     YaraRuleSelectionDialog yaraDialog(this); |     YaraRuleSelectionDialog yaraDialog(this); | ||||||
|     if(yaraDialog.exec() == QDialog::Accepted) |     if(yaraDialog.exec() == QDialog::Accepted) | ||||||
|     { |     { | ||||||
|         QString addrText = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         QString addrText = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|         DbgCmdExec(QString("yara \"%0\",%1").arg(yaraDialog.getSelectedFile()).arg(addrText).toUtf8().constData()); |         DbgCmdExec(QString("yara \"%0\",%1").arg(yaraDialog.getSelectedFile()).arg(addrText).toUtf8().constData()); | ||||||
|         emit displayReferencesWidget(); |         emit displayReferencesWidget(); | ||||||
|     } |     } | ||||||
|  | @ -1464,8 +1464,8 @@ void CPUDump::yaraSlot() | ||||||
| 
 | 
 | ||||||
| void CPUDump::dataCopySlot() | void CPUDump::dataCopySlot() | ||||||
| { | { | ||||||
|     int_t selStart = getSelectionStart(); |     dsint selStart = getSelectionStart(); | ||||||
|     int_t selSize = getSelectionEnd() - selStart + 1; |     dsint selSize = getSelectionEnd() - selStart + 1; | ||||||
|     QVector<byte_t> data; |     QVector<byte_t> data; | ||||||
|     data.resize(selSize); |     data.resize(selSize); | ||||||
|     mMemPage->read(data.data(), selStart, selSize); |     mMemPage->read(data.data(), selStart, selSize); | ||||||
|  | @ -1475,8 +1475,8 @@ void CPUDump::dataCopySlot() | ||||||
| 
 | 
 | ||||||
| void CPUDump::entropySlot() | void CPUDump::entropySlot() | ||||||
| { | { | ||||||
|     int_t selStart = getSelectionStart(); |     dsint selStart = getSelectionStart(); | ||||||
|     int_t selSize = getSelectionEnd() - selStart + 1; |     dsint selSize = getSelectionEnd() - selStart + 1; | ||||||
|     QVector<byte_t> data; |     QVector<byte_t> data; | ||||||
|     data.resize(selSize); |     data.resize(selSize); | ||||||
|     mMemPage->read(data.data(), selStart, selSize); |     mMemPage->read(data.data(), selStart, selSize); | ||||||
|  | @ -1490,14 +1490,14 @@ void CPUDump::entropySlot() | ||||||
| 
 | 
 | ||||||
| void CPUDump::copyAddressSlot() | void CPUDump::copyAddressSlot() | ||||||
| { | { | ||||||
|     QString addrText = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addrText = QString("%1").arg(rvaToVa(getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     Bridge::CopyToClipboard(addrText); |     Bridge::CopyToClipboard(addrText); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUDump::copyRvaSlot() | void CPUDump::copyRvaSlot() | ||||||
| { | { | ||||||
|     uint_t addr = rvaToVa(getInitialSelection()); |     duint addr = rvaToVa(getInitialSelection()); | ||||||
|     uint_t base = DbgFunctions()->ModBaseFromAddr(addr); |     duint base = DbgFunctions()->ModBaseFromAddr(addr); | ||||||
|     if(base) |     if(base) | ||||||
|     { |     { | ||||||
|         QString addrText = QString("%1").arg(addr - base, 0, 16, QChar('0')).toUpper(); |         QString addrText = QString("%1").arg(addr - base, 0, 16, QChar('0')).toUpper(); | ||||||
|  |  | ||||||
|  | @ -10,7 +10,7 @@ class CPUDump : public HexDump | ||||||
|     Q_OBJECT |     Q_OBJECT | ||||||
| public: | public: | ||||||
|     explicit CPUDump(CPUDisassembly* disas, QWidget* parent = 0); |     explicit CPUDump(CPUDisassembly* disas, QWidget* parent = 0); | ||||||
|     QString paintContent(QPainter* painter, int_t rowBase, int rowOffset, int col, int x, int y, int w, int h); |     QString paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h); | ||||||
|     void setupContextMenu(); |     void setupContextMenu(); | ||||||
|     void contextMenuEvent(QContextMenuEvent* event); |     void contextMenuEvent(QContextMenuEvent* event); | ||||||
|     void mouseDoubleClickEvent(QMouseEvent* event); |     void mouseDoubleClickEvent(QMouseEvent* event); | ||||||
|  |  | ||||||
|  | @ -50,7 +50,7 @@ void CPUInfoBox::clear() | ||||||
|     setInfoLine(2, ""); |     setInfoLine(2, ""); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| QString CPUInfoBox::getSymbolicName(int_t addr) | QString CPUInfoBox::getSymbolicName(dsint addr) | ||||||
| { | { | ||||||
|     char labelText[MAX_LABEL_SIZE] = ""; |     char labelText[MAX_LABEL_SIZE] = ""; | ||||||
|     char moduleText[MAX_MODULE_SIZE] = ""; |     char moduleText[MAX_MODULE_SIZE] = ""; | ||||||
|  | @ -59,7 +59,7 @@ QString CPUInfoBox::getSymbolicName(int_t addr) | ||||||
|     bool bHasLabel = DbgGetLabelAt(addr, SEG_DEFAULT, labelText); |     bool bHasLabel = DbgGetLabelAt(addr, SEG_DEFAULT, labelText); | ||||||
|     bool bHasModule = (DbgGetModuleAt(addr, moduleText) && !QString(labelText).startsWith("JMP.&")); |     bool bHasModule = (DbgGetModuleAt(addr, moduleText) && !QString(labelText).startsWith("JMP.&")); | ||||||
|     QString addrText; |     QString addrText; | ||||||
|     addrText = QString("%1").arg(addr & (uint_t) - 1, 0, 16, QChar('0')).toUpper(); |     addrText = QString("%1").arg(addr & (duint) - 1, 0, 16, QChar('0')).toUpper(); | ||||||
|     QString finalText; |     QString finalText; | ||||||
|     if(bHasString) |     if(bHasString) | ||||||
|         finalText = addrText + " " + QString(string); |         finalText = addrText + " " + QString(string); | ||||||
|  | @ -88,7 +88,7 @@ QString CPUInfoBox::getSymbolicName(int_t addr) | ||||||
|     return finalText; |     return finalText; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUInfoBox::disasmSelectionChanged(int_t parVA) | void CPUInfoBox::disasmSelectionChanged(dsint parVA) | ||||||
| { | { | ||||||
|     curAddr = parVA; |     curAddr = parVA; | ||||||
|     if(!DbgIsDebugging() || !DbgMemIsValidReadPtr(parVA)) |     if(!DbgIsDebugging() || !DbgMemIsValidReadPtr(parVA)) | ||||||
|  | @ -149,7 +149,7 @@ void CPUInfoBox::disasmSelectionChanged(int_t parVA) | ||||||
|             else |             else | ||||||
|             { |             { | ||||||
|                 QString addrText; |                 QString addrText; | ||||||
|                 if(memsize == sizeof(int_t)) |                 if(memsize == sizeof(dsint)) | ||||||
|                     addrText = getSymbolicName(arg.memvalue); |                     addrText = getSymbolicName(arg.memvalue); | ||||||
|                 else |                 else | ||||||
|                     addrText = QString("%1").arg(arg.memvalue, memsize * 2, 16, QChar('0')).toUpper(); |                     addrText = QString("%1").arg(arg.memvalue, memsize * 2, 16, QChar('0')).toUpper(); | ||||||
|  | @ -175,7 +175,7 @@ void CPUInfoBox::disasmSelectionChanged(int_t parVA) | ||||||
|     char mod[MAX_MODULE_SIZE] = ""; |     char mod[MAX_MODULE_SIZE] = ""; | ||||||
|     if(DbgFunctions()->ModNameFromAddr(parVA, mod, true)) |     if(DbgFunctions()->ModNameFromAddr(parVA, mod, true)) | ||||||
|     { |     { | ||||||
|         int_t modbase = DbgFunctions()->ModBaseFromAddr(parVA); |         dsint modbase = DbgFunctions()->ModBaseFromAddr(parVA); | ||||||
|         if(modbase) |         if(modbase) | ||||||
|             info = QString(mod) + "[" + QString("%1").arg(parVA - modbase, 0, 16, QChar('0')).toUpper() + "] | "; |             info = QString(mod) + "[" + QString("%1").arg(parVA - modbase, 0, 16, QChar('0')).toUpper() + "] | "; | ||||||
|         else |         else | ||||||
|  | @ -204,7 +204,7 @@ void CPUInfoBox::followActionSlot() | ||||||
|         DbgCmdExec(QString().sprintf("dump \"%s\"", action->objectName().mid(5).toUtf8().constData()).toUtf8().constData()); |         DbgCmdExec(QString().sprintf("dump \"%s\"", action->objectName().mid(5).toUtf8().constData()).toUtf8().constData()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUInfoBox::addFollowMenuItem(QMenu* menu, QString name, int_t value) | void CPUInfoBox::addFollowMenuItem(QMenu* menu, QString name, dsint value) | ||||||
| { | { | ||||||
|     foreach(QAction * action, menu->actions()) //check for duplicate action
 |     foreach(QAction * action, menu->actions()) //check for duplicate action
 | ||||||
|     if(action->text() == name) |     if(action->text() == name) | ||||||
|  | @ -212,11 +212,11 @@ void CPUInfoBox::addFollowMenuItem(QMenu* menu, QString name, int_t value) | ||||||
|     QAction* newAction = new QAction(name, this); |     QAction* newAction = new QAction(name, this); | ||||||
|     newAction->setFont(QFont("Courier New", 8)); |     newAction->setFont(QFont("Courier New", 8)); | ||||||
|     menu->addAction(newAction); |     menu->addAction(newAction); | ||||||
|     newAction->setObjectName(QString("DUMP|") + QString("%1").arg(value, sizeof(int_t) * 2, 16, QChar('0')).toUpper()); |     newAction->setObjectName(QString("DUMP|") + QString("%1").arg(value, sizeof(dsint) * 2, 16, QChar('0')).toUpper()); | ||||||
|     connect(newAction, SIGNAL(triggered()), this, SLOT(followActionSlot())); |     connect(newAction, SIGNAL(triggered()), this, SLOT(followActionSlot())); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUInfoBox::setupFollowMenu(QMenu* menu, int_t wVA) | void CPUInfoBox::setupFollowMenu(QMenu* menu, dsint wVA) | ||||||
| { | { | ||||||
|     //most basic follow action
 |     //most basic follow action
 | ||||||
|     addFollowMenuItem(menu, "&Selection", wVA); |     addFollowMenuItem(menu, "&Selection", wVA); | ||||||
|  |  | ||||||
|  | @ -9,18 +9,18 @@ class CPUInfoBox : public StdTable | ||||||
| public: | public: | ||||||
|     explicit CPUInfoBox(StdTable* parent = 0); |     explicit CPUInfoBox(StdTable* parent = 0); | ||||||
|     int getHeight(); |     int getHeight(); | ||||||
|     void addFollowMenuItem(QMenu* menu, QString name, int_t value); |     void addFollowMenuItem(QMenu* menu, QString name, dsint value); | ||||||
|     void setupFollowMenu(QMenu* menu, int_t wVA); |     void setupFollowMenu(QMenu* menu, dsint wVA); | ||||||
| 
 | 
 | ||||||
| public slots: | public slots: | ||||||
|     void disasmSelectionChanged(int_t parVA); |     void disasmSelectionChanged(dsint parVA); | ||||||
|     void dbgStateChanged(DBGSTATE state); |     void dbgStateChanged(DBGSTATE state); | ||||||
|     void contextMenuSlot(QPoint pos); |     void contextMenuSlot(QPoint pos); | ||||||
|     void followActionSlot(); |     void followActionSlot(); | ||||||
| 
 | 
 | ||||||
| private: | private: | ||||||
|     int_t curAddr; |     dsint curAddr; | ||||||
|     QString getSymbolicName(int_t addr); |     QString getSymbolicName(dsint addr); | ||||||
|     void setInfoLine(int line, QString text); |     void setInfoLine(int line, QString text); | ||||||
|     QString getInfoLine(int line); |     QString getInfoLine(int line); | ||||||
|     void clear(); |     void clear(); | ||||||
|  |  | ||||||
|  | @ -43,7 +43,7 @@ void CPUSideBar::repaint() | ||||||
|     viewport()->repaint(); |     viewport()->repaint(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUSideBar::changeTopmostAddress(int_t i) | void CPUSideBar::changeTopmostAddress(dsint i) | ||||||
| { | { | ||||||
|     if(i != topVA) |     if(i != topVA) | ||||||
|     { |     { | ||||||
|  | @ -59,7 +59,7 @@ void CPUSideBar::setViewableRows(int rows) | ||||||
|     viewableRows = rows; |     viewableRows = rows; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUSideBar::setSelection(int_t selVA) | void CPUSideBar::setSelection(dsint selVA) | ||||||
| { | { | ||||||
|     if(selVA != selectedVA) |     if(selVA != selectedVA) | ||||||
|     { |     { | ||||||
|  | @ -73,9 +73,9 @@ bool CPUSideBar::isJump(int i) const | ||||||
|     int BranchType = InstrBuffer->at(i).disasm.Instruction.BranchType; |     int BranchType = InstrBuffer->at(i).disasm.Instruction.BranchType; | ||||||
|     if(BranchType && BranchType != RetType && BranchType != CallType) |     if(BranchType && BranchType != RetType && BranchType != CallType) | ||||||
|     { |     { | ||||||
|         uint_t start = CodePtr->getBase(); |         duint start = CodePtr->getBase(); | ||||||
|         uint_t end = start + CodePtr->getSize(); |         duint end = start + CodePtr->getSize(); | ||||||
|         uint_t addr = DbgGetBranchDestination(CodePtr->rvaToVa(InstrBuffer->at(i).rva)); |         duint addr = DbgGetBranchDestination(CodePtr->rvaToVa(InstrBuffer->at(i).rva)); | ||||||
|         return addr >= start && addr < end; //do not draw jumps that go out of the section
 |         return addr >= start && addr < end; //do not draw jumps that go out of the section
 | ||||||
|     } |     } | ||||||
|     return false; |     return false; | ||||||
|  | @ -95,15 +95,15 @@ void CPUSideBar::paintEvent(QPaintEvent* event) | ||||||
| 
 | 
 | ||||||
|     int jumpoffset = 0; |     int jumpoffset = 0; | ||||||
| 
 | 
 | ||||||
|     int_t last_va = InstrBuffer->last().rva + CodePtr->getBase(); |     dsint last_va = InstrBuffer->last().rva + CodePtr->getBase(); | ||||||
|     int_t first_va = InstrBuffer->first().rva + CodePtr->getBase(); |     dsint first_va = InstrBuffer->first().rva + CodePtr->getBase(); | ||||||
| 
 | 
 | ||||||
|     for(int line = 0; line < viewableRows; line++) |     for(int line = 0; line < viewableRows; line++) | ||||||
|     { |     { | ||||||
|         if(line >= InstrBuffer->size()) //at the end of the page it will crash otherwise
 |         if(line >= InstrBuffer->size()) //at the end of the page it will crash otherwise
 | ||||||
|             break; |             break; | ||||||
|         Instruction_t instr = InstrBuffer->at(line); |         Instruction_t instr = InstrBuffer->at(line); | ||||||
|         int_t instrVA = instr.rva + CodePtr->getBase(); |         dsint instrVA = instr.rva + CodePtr->getBase(); | ||||||
| 
 | 
 | ||||||
|         // draw bullet
 |         // draw bullet
 | ||||||
|         drawBullets(&painter, line, DbgGetBpxTypeAt(instrVA) != bp_none, DbgIsBpDisabled(instrVA), DbgGetBookmarkAt(instrVA)); |         drawBullets(&painter, line, DbgGetBpxTypeAt(instrVA) != bp_none, DbgIsBpDisabled(instrVA), DbgGetBookmarkAt(instrVA)); | ||||||
|  | @ -120,7 +120,7 @@ void CPUSideBar::paintEvent(QPaintEvent* event) | ||||||
| 
 | 
 | ||||||
|             jumpoffset++; |             jumpoffset++; | ||||||
| 
 | 
 | ||||||
|             int_t destVA = (int_t)DbgGetBranchDestination(CodePtr->rvaToVa(instr.rva)); |             dsint destVA = (dsint)DbgGetBranchDestination(CodePtr->rvaToVa(instr.rva)); | ||||||
| 
 | 
 | ||||||
|             if(instr.disasm.Instruction.Opcode == 0xFF) |             if(instr.disasm.Instruction.Opcode == 0xFF) | ||||||
|                 continue; |                 continue; | ||||||
|  | @ -156,7 +156,7 @@ void CPUSideBar::paintEvent(QPaintEvent* event) | ||||||
|             drawLabel(&painter, line, "EIP"); |             drawLabel(&painter, line, "EIP"); | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|         const int_t cur_VA = CodePtr->getBase() + InstrBuffer->at(line).rva; |         const dsint cur_VA = CodePtr->getBase() + InstrBuffer->at(line).rva; | ||||||
| #ifdef _WIN64 | #ifdef _WIN64 | ||||||
|         if(cur_VA == regDump.regcontext.cax)  drawLabel(&painter, line, "RAX"); |         if(cur_VA == regDump.regcontext.cax)  drawLabel(&painter, line, "RAX"); | ||||||
|         if(cur_VA == regDump.regcontext.cbx)  drawLabel(&painter, line, "RBX"); |         if(cur_VA == regDump.regcontext.cbx)  drawLabel(&painter, line, "RBX"); | ||||||
|  | @ -196,7 +196,7 @@ void CPUSideBar::mouseReleaseEvent(QMouseEvent* e) | ||||||
|         return; |         return; | ||||||
| 
 | 
 | ||||||
|     // calculate virtual adress of clicked line
 |     // calculate virtual adress of clicked line
 | ||||||
|     uint_t wVA = InstrBuffer->at(line).rva + CodePtr->getBase(); |     duint wVA = InstrBuffer->at(line).rva + CodePtr->getBase(); | ||||||
| 
 | 
 | ||||||
|     QString wCmd; |     QString wCmd; | ||||||
|     // create --> disable --> delete --> create --> ...
 |     // create --> disable --> delete --> create --> ...
 | ||||||
|  | @ -204,17 +204,17 @@ void CPUSideBar::mouseReleaseEvent(QMouseEvent* e) | ||||||
|     { |     { | ||||||
|     case bp_enabled: |     case bp_enabled: | ||||||
|         // breakpoint exists and is enabled --> disable breakpoint
 |         // breakpoint exists and is enabled --> disable breakpoint
 | ||||||
|         wCmd = "bd " + QString("%1").arg(wVA, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         wCmd = "bd " + QString("%1").arg(wVA, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|         DbgCmdExec(wCmd.toUtf8().constData()); |         DbgCmdExec(wCmd.toUtf8().constData()); | ||||||
|         break; |         break; | ||||||
|     case bp_disabled: |     case bp_disabled: | ||||||
|         // is disabled --> delete
 |         // is disabled --> delete
 | ||||||
|         wCmd = "bc " + QString("%1").arg(wVA, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         wCmd = "bc " + QString("%1").arg(wVA, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|         DbgCmdExec(wCmd.toUtf8().constData()); |         DbgCmdExec(wCmd.toUtf8().constData()); | ||||||
|         break; |         break; | ||||||
|     case bp_non_existent: |     case bp_non_existent: | ||||||
|         // no breakpoint was found --> create breakpoint
 |         // no breakpoint was found --> create breakpoint
 | ||||||
|         wCmd = "bp " + QString("%1").arg(wVA, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         wCmd = "bp " + QString("%1").arg(wVA, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|         DbgCmdExec(wCmd.toUtf8().constData()); |         DbgCmdExec(wCmd.toUtf8().constData()); | ||||||
|         break; |         break; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -7,7 +7,7 @@ | ||||||
| class CPUSideBar : public QAbstractScrollArea | class CPUSideBar : public QAbstractScrollArea | ||||||
| { | { | ||||||
|     Q_OBJECT |     Q_OBJECT | ||||||
|     QPair<int_t, int_t> mHighlightedJump; |     QPair<dsint, dsint> mHighlightedJump; | ||||||
| public: | public: | ||||||
|     explicit CPUSideBar(CPUDisassembly* Ptr, QWidget* parent = 0); |     explicit CPUSideBar(CPUDisassembly* Ptr, QWidget* parent = 0); | ||||||
|     QSize sizeHint() const; |     QSize sizeHint() const; | ||||||
|  | @ -19,9 +19,9 @@ public: | ||||||
| public slots: | public slots: | ||||||
|     void debugStateChangedSlot(DBGSTATE state); |     void debugStateChangedSlot(DBGSTATE state); | ||||||
|     void repaint(); |     void repaint(); | ||||||
|     void changeTopmostAddress(int_t i); |     void changeTopmostAddress(dsint i); | ||||||
|     void setViewableRows(int rows); |     void setViewableRows(int rows); | ||||||
|     void setSelection(int_t selVA); |     void setSelection(dsint selVA); | ||||||
| 
 | 
 | ||||||
| protected: | protected: | ||||||
|     virtual void paintEvent(QPaintEvent* event); |     virtual void paintEvent(QPaintEvent* event); | ||||||
|  | @ -33,8 +33,8 @@ protected: | ||||||
|     void drawJump(QPainter* painter, int startLine, int endLine, int jumpoffset, bool conditional, bool isexecute, bool isactive); |     void drawJump(QPainter* painter, int startLine, int endLine, int jumpoffset, bool conditional, bool isexecute, bool isactive); | ||||||
| 
 | 
 | ||||||
| private: | private: | ||||||
|     int_t topVA; |     dsint topVA; | ||||||
|     int_t selectedVA; |     dsint selectedVA; | ||||||
|     QFont m_DefaultFont; |     QFont m_DefaultFont; | ||||||
|     int fontWidth, fontHeight; |     int fontWidth, fontHeight; | ||||||
|     int viewableRows; |     int viewableRows; | ||||||
|  |  | ||||||
|  | @ -25,7 +25,7 @@ CPUStack::CPUStack(QWidget* parent) : HexDump(parent) | ||||||
|     wColDesc.data.itemSize = Dword; |     wColDesc.data.itemSize = Dword; | ||||||
|     wColDesc.data.dwordMode = HexDword; |     wColDesc.data.dwordMode = HexDword; | ||||||
| #endif | #endif | ||||||
|     appendDescriptor(8 + charwidth * 2 * sizeof(uint_t), "void*", false, wColDesc); |     appendDescriptor(8 + charwidth * 2 * sizeof(duint), "void*", false, wColDesc); | ||||||
| 
 | 
 | ||||||
|     wColDesc.isData = false; //comments
 |     wColDesc.isData = false; //comments
 | ||||||
|     wColDesc.itemCount = 0; |     wColDesc.itemCount = 0; | ||||||
|  | @ -35,7 +35,7 @@ CPUStack::CPUStack(QWidget* parent) : HexDump(parent) | ||||||
|     wColDesc.data = dDesc; |     wColDesc.data = dDesc; | ||||||
|     appendDescriptor(2000, "Comments", false, wColDesc); |     appendDescriptor(2000, "Comments", false, wColDesc); | ||||||
| 
 | 
 | ||||||
|     connect(Bridge::getBridge(), SIGNAL(stackDumpAt(uint_t, uint_t)), this, SLOT(stackDumpAt(uint_t, uint_t))); |     connect(Bridge::getBridge(), SIGNAL(stackDumpAt(duint, duint)), this, SLOT(stackDumpAt(duint, duint))); | ||||||
|     connect(Bridge::getBridge(), SIGNAL(selectionStackGet(SELECTIONDATA*)), this, SLOT(selectionGet(SELECTIONDATA*))); |     connect(Bridge::getBridge(), SIGNAL(selectionStackGet(SELECTIONDATA*)), this, SLOT(selectionGet(SELECTIONDATA*))); | ||||||
|     connect(Bridge::getBridge(), SIGNAL(selectionStackSet(const SELECTIONDATA*)), this, SLOT(selectionSet(const SELECTIONDATA*))); |     connect(Bridge::getBridge(), SIGNAL(selectionStackSet(const SELECTIONDATA*)), this, SLOT(selectionSet(const SELECTIONDATA*))); | ||||||
| 
 | 
 | ||||||
|  | @ -170,7 +170,7 @@ void CPUStack::refreshShortcutsSlot() | ||||||
|     mGotoExpression->setShortcut(ConfigShortcut("ActionGotoExpression")); |     mGotoExpression->setShortcut(ConfigShortcut("ActionGotoExpression")); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| QString CPUStack::paintContent(QPainter* painter, int_t rowBase, int rowOffset, int col, int x, int y, int w, int h) | QString CPUStack::paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h) | ||||||
| { | { | ||||||
|     // Reset byte offset when base address is reached
 |     // Reset byte offset when base address is reached
 | ||||||
|     if(rowBase == 0 && mByteOffset != 0) |     if(rowBase == 0 && mByteOffset != 0) | ||||||
|  | @ -178,8 +178,8 @@ QString CPUStack::paintContent(QPainter* painter, int_t rowBase, int rowOffset, | ||||||
| 
 | 
 | ||||||
|     // Compute RVA
 |     // Compute RVA
 | ||||||
|     int wBytePerRowCount = getBytePerRowCount(); |     int wBytePerRowCount = getBytePerRowCount(); | ||||||
|     int_t wRva = (rowBase + rowOffset) * wBytePerRowCount - mByteOffset; |     dsint wRva = (rowBase + rowOffset) * wBytePerRowCount - mByteOffset; | ||||||
|     uint_t wVa = rvaToVa(wRva); |     duint wVa = rvaToVa(wRva); | ||||||
| 
 | 
 | ||||||
|     bool wIsSelected = isSelected(wRva); |     bool wIsSelected = isSelected(wRva); | ||||||
|     if(wIsSelected) //highlight if selected
 |     if(wIsSelected) //highlight if selected
 | ||||||
|  | @ -195,10 +195,10 @@ QString CPUStack::paintContent(QPainter* painter, int_t rowBase, int rowOffset, | ||||||
|     { |     { | ||||||
|         char label[MAX_LABEL_SIZE] = ""; |         char label[MAX_LABEL_SIZE] = ""; | ||||||
|         QString addrText = ""; |         QString addrText = ""; | ||||||
|         int_t cur_addr = rvaToVa((rowBase + rowOffset) * getBytePerRowCount() - mByteOffset); |         dsint cur_addr = rvaToVa((rowBase + rowOffset) * getBytePerRowCount() - mByteOffset); | ||||||
|         if(mRvaDisplayEnabled) //RVA display
 |         if(mRvaDisplayEnabled) //RVA display
 | ||||||
|         { |         { | ||||||
|             int_t rva = cur_addr - mRvaDisplayBase; |             dsint rva = cur_addr - mRvaDisplayBase; | ||||||
|             if(rva == 0) |             if(rva == 0) | ||||||
|             { |             { | ||||||
| #ifdef _WIN64 | #ifdef _WIN64 | ||||||
|  | @ -274,7 +274,7 @@ QString CPUStack::paintContent(QPainter* painter, int_t rowBase, int rowOffset, | ||||||
|     else if(mDescriptor.at(col - 1).isData == true) //paint stack data
 |     else if(mDescriptor.at(col - 1).isData == true) //paint stack data
 | ||||||
|     { |     { | ||||||
|         int wBytePerRowCount = getBytePerRowCount(); |         int wBytePerRowCount = getBytePerRowCount(); | ||||||
|         int_t wRva = (rowBase + rowOffset) * wBytePerRowCount - mByteOffset; |         dsint wRva = (rowBase + rowOffset) * wBytePerRowCount - mByteOffset; | ||||||
|         printSelected(painter, rowBase, rowOffset, col, x, y, w, h); |         printSelected(painter, rowBase, rowOffset, col, x, y, w, h); | ||||||
|         QList<RichTextPainter::CustomRichText_t> richText; |         QList<RichTextPainter::CustomRichText_t> richText; | ||||||
|         getString(col - 1, wRva, &richText); |         getString(col - 1, wRva, &richText); | ||||||
|  | @ -314,8 +314,8 @@ void CPUStack::contextMenuEvent(QContextMenuEvent* event) | ||||||
|     QMenu* wMenu = new QMenu(this); //create context menu
 |     QMenu* wMenu = new QMenu(this); //create context menu
 | ||||||
|     wMenu->addAction(mModifyAction); |     wMenu->addAction(mModifyAction); | ||||||
|     wMenu->addMenu(mBinaryMenu); |     wMenu->addMenu(mBinaryMenu); | ||||||
|     int_t start = rvaToVa(getSelectionStart()); |     dsint start = rvaToVa(getSelectionStart()); | ||||||
|     int_t end = rvaToVa(getSelectionEnd()); |     dsint end = rvaToVa(getSelectionEnd()); | ||||||
|     if(DbgFunctions()->PatchInRange(start, end)) //nothing patched in selected range
 |     if(DbgFunctions()->PatchInRange(start, end)) //nothing patched in selected range
 | ||||||
|         wMenu->addAction(mUndoSelection); |         wMenu->addAction(mUndoSelection); | ||||||
|     wMenu->addAction(mFindPatternAction); |     wMenu->addAction(mFindPatternAction); | ||||||
|  | @ -323,12 +323,12 @@ void CPUStack::contextMenuEvent(QContextMenuEvent* event) | ||||||
|     wMenu->addAction(mGotoBp); |     wMenu->addAction(mGotoBp); | ||||||
|     wMenu->addAction(mGotoExpression); |     wMenu->addAction(mGotoExpression); | ||||||
| 
 | 
 | ||||||
|     uint_t selectedData; |     duint selectedData; | ||||||
|     if(mMemPage->read((byte_t*)&selectedData, getInitialSelection(), sizeof(uint_t))) |     if(mMemPage->read((byte_t*)&selectedData, getInitialSelection(), sizeof(duint))) | ||||||
|         if(DbgMemIsValidReadPtr(selectedData)) //data is a pointer
 |         if(DbgMemIsValidReadPtr(selectedData)) //data is a pointer
 | ||||||
|         { |         { | ||||||
|             uint_t stackBegin = mMemPage->getBase(); |             duint stackBegin = mMemPage->getBase(); | ||||||
|             uint_t stackEnd = stackBegin + mMemPage->getSize(); |             duint stackEnd = stackBegin + mMemPage->getSize(); | ||||||
|             if(selectedData >= stackBegin && selectedData < stackEnd) |             if(selectedData >= stackBegin && selectedData < stackEnd) | ||||||
|                 wMenu->addAction(mFollowStack); |                 wMenu->addAction(mFollowStack); | ||||||
|             else |             else | ||||||
|  | @ -351,10 +351,10 @@ void CPUStack::mouseDoubleClickEvent(QMouseEvent* event) | ||||||
|     case 0: //address
 |     case 0: //address
 | ||||||
|     { |     { | ||||||
|         //very ugly way to calculate the base of the current row (no clue why it works)
 |         //very ugly way to calculate the base of the current row (no clue why it works)
 | ||||||
|         int_t deltaRowBase = getInitialSelection() % getBytePerRowCount() + mByteOffset; |         dsint deltaRowBase = getInitialSelection() % getBytePerRowCount() + mByteOffset; | ||||||
|         if(deltaRowBase >= getBytePerRowCount()) |         if(deltaRowBase >= getBytePerRowCount()) | ||||||
|             deltaRowBase -= getBytePerRowCount(); |             deltaRowBase -= getBytePerRowCount(); | ||||||
|         int_t mSelectedVa = rvaToVa(getInitialSelection() - deltaRowBase); |         dsint mSelectedVa = rvaToVa(getInitialSelection() - deltaRowBase); | ||||||
|         if(mRvaDisplayEnabled && mSelectedVa == mRvaDisplayBase) |         if(mRvaDisplayEnabled && mSelectedVa == mRvaDisplayBase) | ||||||
|             mRvaDisplayEnabled = false; |             mRvaDisplayEnabled = false; | ||||||
|         else |         else | ||||||
|  | @ -375,7 +375,7 @@ void CPUStack::mouseDoubleClickEvent(QMouseEvent* event) | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUStack::stackDumpAt(uint_t addr, uint_t csp) | void CPUStack::stackDumpAt(duint addr, duint csp) | ||||||
| { | { | ||||||
|     mCsp = csp; |     mCsp = csp; | ||||||
|     printDumpAt(addr); |     printDumpAt(addr); | ||||||
|  | @ -401,8 +401,8 @@ void CPUStack::gotoExpressionSlot() | ||||||
| { | { | ||||||
|     if(!DbgIsDebugging()) |     if(!DbgIsDebugging()) | ||||||
|         return; |         return; | ||||||
|     uint_t size = 0; |     duint size = 0; | ||||||
|     uint_t base = DbgMemFindBaseAddr(mCsp, &size); |     duint base = DbgMemFindBaseAddr(mCsp, &size); | ||||||
|     if(!mGoto) |     if(!mGoto) | ||||||
|         mGoto = new GotoDialog(this); |         mGoto = new GotoDialog(this); | ||||||
|     mGoto->validRangeStart = base; |     mGoto->validRangeStart = base; | ||||||
|  | @ -424,10 +424,10 @@ void CPUStack::selectionGet(SELECTIONDATA* selection) | ||||||
| 
 | 
 | ||||||
| void CPUStack::selectionSet(const SELECTIONDATA* selection) | void CPUStack::selectionSet(const SELECTIONDATA* selection) | ||||||
| { | { | ||||||
|     int_t selMin = mMemPage->getBase(); |     dsint selMin = mMemPage->getBase(); | ||||||
|     int_t selMax = selMin + mMemPage->getSize(); |     dsint selMax = selMin + mMemPage->getSize(); | ||||||
|     int_t start = selection->start; |     dsint start = selection->start; | ||||||
|     int_t end = selection->end; |     dsint end = selection->end; | ||||||
|     if(start < selMin || start >= selMax || end < selMin || end >= selMax) //selection out of range
 |     if(start < selMin || start >= selMax || end < selMin || end >= selMax) //selection out of range
 | ||||||
|     { |     { | ||||||
|         Bridge::getBridge()->setResult(0); |         Bridge::getBridge()->setResult(0); | ||||||
|  | @ -441,33 +441,33 @@ void CPUStack::selectionSet(const SELECTIONDATA* selection) | ||||||
| 
 | 
 | ||||||
| void CPUStack::followDisasmSlot() | void CPUStack::followDisasmSlot() | ||||||
| { | { | ||||||
|     uint_t selectedData; |     duint selectedData; | ||||||
|     if(mMemPage->read((byte_t*)&selectedData, getInitialSelection(), sizeof(uint_t))) |     if(mMemPage->read((byte_t*)&selectedData, getInitialSelection(), sizeof(duint))) | ||||||
|         if(DbgMemIsValidReadPtr(selectedData)) //data is a pointer
 |         if(DbgMemIsValidReadPtr(selectedData)) //data is a pointer
 | ||||||
|         { |         { | ||||||
|             QString addrText = QString("%1").arg(selectedData, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |             QString addrText = QString("%1").arg(selectedData, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|             DbgCmdExec(QString("disasm " + addrText).toUtf8().constData()); |             DbgCmdExec(QString("disasm " + addrText).toUtf8().constData()); | ||||||
|         } |         } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUStack::followDumpSlot() | void CPUStack::followDumpSlot() | ||||||
| { | { | ||||||
|     uint_t selectedData; |     duint selectedData; | ||||||
|     if(mMemPage->read((byte_t*)&selectedData, getInitialSelection(), sizeof(uint_t))) |     if(mMemPage->read((byte_t*)&selectedData, getInitialSelection(), sizeof(duint))) | ||||||
|         if(DbgMemIsValidReadPtr(selectedData)) //data is a pointer
 |         if(DbgMemIsValidReadPtr(selectedData)) //data is a pointer
 | ||||||
|         { |         { | ||||||
|             QString addrText = QString("%1").arg(selectedData, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |             QString addrText = QString("%1").arg(selectedData, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|             DbgCmdExec(QString("dump " + addrText).toUtf8().constData()); |             DbgCmdExec(QString("dump " + addrText).toUtf8().constData()); | ||||||
|         } |         } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUStack::followStackSlot() | void CPUStack::followStackSlot() | ||||||
| { | { | ||||||
|     uint_t selectedData; |     duint selectedData; | ||||||
|     if(mMemPage->read((byte_t*)&selectedData, getInitialSelection(), sizeof(uint_t))) |     if(mMemPage->read((byte_t*)&selectedData, getInitialSelection(), sizeof(duint))) | ||||||
|         if(DbgMemIsValidReadPtr(selectedData)) //data is a pointer
 |         if(DbgMemIsValidReadPtr(selectedData)) //data is a pointer
 | ||||||
|         { |         { | ||||||
|             QString addrText = QString("%1").arg(selectedData, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |             QString addrText = QString("%1").arg(selectedData, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|             DbgCmdExec(QString("sdump " + addrText).toUtf8().constData()); |             DbgCmdExec(QString("sdump " + addrText).toUtf8().constData()); | ||||||
|         } |         } | ||||||
| } | } | ||||||
|  | @ -475,17 +475,17 @@ void CPUStack::followStackSlot() | ||||||
| void CPUStack::binaryEditSlot() | void CPUStack::binaryEditSlot() | ||||||
| { | { | ||||||
|     HexEditDialog hexEdit(this); |     HexEditDialog hexEdit(this); | ||||||
|     int_t selStart = getSelectionStart(); |     dsint selStart = getSelectionStart(); | ||||||
|     int_t selSize = getSelectionEnd() - selStart + 1; |     dsint selSize = getSelectionEnd() - selStart + 1; | ||||||
|     byte_t* data = new byte_t[selSize]; |     byte_t* data = new byte_t[selSize]; | ||||||
|     mMemPage->read(data, selStart, selSize); |     mMemPage->read(data, selStart, selSize); | ||||||
|     hexEdit.mHexEdit->setData(QByteArray((const char*)data, selSize)); |     hexEdit.mHexEdit->setData(QByteArray((const char*)data, selSize)); | ||||||
|     delete [] data; |     delete [] data; | ||||||
|     hexEdit.setWindowTitle("Edit data at " + QString("%1").arg(rvaToVa(selStart), sizeof(int_t) * 2, 16, QChar('0')).toUpper()); |     hexEdit.setWindowTitle("Edit data at " + QString("%1").arg(rvaToVa(selStart), sizeof(dsint) * 2, 16, QChar('0')).toUpper()); | ||||||
|     if(hexEdit.exec() != QDialog::Accepted) |     if(hexEdit.exec() != QDialog::Accepted) | ||||||
|         return; |         return; | ||||||
|     int_t dataSize = hexEdit.mHexEdit->data().size(); |     dsint dataSize = hexEdit.mHexEdit->data().size(); | ||||||
|     int_t newSize = selSize > dataSize ? selSize : dataSize; |     dsint newSize = selSize > dataSize ? selSize : dataSize; | ||||||
|     data = new byte_t[newSize]; |     data = new byte_t[newSize]; | ||||||
|     mMemPage->read(data, selStart, newSize); |     mMemPage->read(data, selStart, newSize); | ||||||
|     QByteArray patched = hexEdit.mHexEdit->applyMaskedData(QByteArray((const char*)data, newSize)); |     QByteArray patched = hexEdit.mHexEdit->applyMaskedData(QByteArray((const char*)data, newSize)); | ||||||
|  | @ -497,12 +497,12 @@ void CPUStack::binaryFillSlot() | ||||||
| { | { | ||||||
|     HexEditDialog hexEdit(this); |     HexEditDialog hexEdit(this); | ||||||
|     hexEdit.mHexEdit->setOverwriteMode(false); |     hexEdit.mHexEdit->setOverwriteMode(false); | ||||||
|     int_t selStart = getSelectionStart(); |     dsint selStart = getSelectionStart(); | ||||||
|     hexEdit.setWindowTitle("Fill data at " + QString("%1").arg(rvaToVa(selStart), sizeof(int_t) * 2, 16, QChar('0')).toUpper()); |     hexEdit.setWindowTitle("Fill data at " + QString("%1").arg(rvaToVa(selStart), sizeof(dsint) * 2, 16, QChar('0')).toUpper()); | ||||||
|     if(hexEdit.exec() != QDialog::Accepted) |     if(hexEdit.exec() != QDialog::Accepted) | ||||||
|         return; |         return; | ||||||
|     QString pattern = hexEdit.mHexEdit->pattern(); |     QString pattern = hexEdit.mHexEdit->pattern(); | ||||||
|     int_t selSize = getSelectionEnd() - selStart + 1; |     dsint selSize = getSelectionEnd() - selStart + 1; | ||||||
|     byte_t* data = new byte_t[selSize]; |     byte_t* data = new byte_t[selSize]; | ||||||
|     mMemPage->read(data, selStart, selSize); |     mMemPage->read(data, selStart, selSize); | ||||||
|     hexEdit.mHexEdit->setData(QByteArray((const char*)data, selSize)); |     hexEdit.mHexEdit->setData(QByteArray((const char*)data, selSize)); | ||||||
|  | @ -516,8 +516,8 @@ void CPUStack::binaryFillSlot() | ||||||
| void CPUStack::binaryCopySlot() | void CPUStack::binaryCopySlot() | ||||||
| { | { | ||||||
|     HexEditDialog hexEdit(this); |     HexEditDialog hexEdit(this); | ||||||
|     int_t selStart = getSelectionStart(); |     dsint selStart = getSelectionStart(); | ||||||
|     int_t selSize = getSelectionEnd() - selStart + 1; |     dsint selSize = getSelectionEnd() - selStart + 1; | ||||||
|     byte_t* data = new byte_t[selSize]; |     byte_t* data = new byte_t[selSize]; | ||||||
|     mMemPage->read(data, selStart, selSize); |     mMemPage->read(data, selStart, selSize); | ||||||
|     hexEdit.mHexEdit->setData(QByteArray((const char*)data, selSize)); |     hexEdit.mHexEdit->setData(QByteArray((const char*)data, selSize)); | ||||||
|  | @ -528,8 +528,8 @@ void CPUStack::binaryCopySlot() | ||||||
| void CPUStack::binaryPasteSlot() | void CPUStack::binaryPasteSlot() | ||||||
| { | { | ||||||
|     HexEditDialog hexEdit(this); |     HexEditDialog hexEdit(this); | ||||||
|     int_t selStart = getSelectionStart(); |     dsint selStart = getSelectionStart(); | ||||||
|     int_t selSize = getSelectionEnd() - selStart + 1; |     dsint selSize = getSelectionEnd() - selStart + 1; | ||||||
|     QClipboard* clipboard = QApplication::clipboard(); |     QClipboard* clipboard = QApplication::clipboard(); | ||||||
|     hexEdit.mHexEdit->setData(clipboard->text()); |     hexEdit.mHexEdit->setData(clipboard->text()); | ||||||
| 
 | 
 | ||||||
|  | @ -545,8 +545,8 @@ void CPUStack::binaryPasteSlot() | ||||||
| void CPUStack::binaryPasteIgnoreSizeSlot() | void CPUStack::binaryPasteIgnoreSizeSlot() | ||||||
| { | { | ||||||
|     HexEditDialog hexEdit(this); |     HexEditDialog hexEdit(this); | ||||||
|     int_t selStart = getSelectionStart(); |     dsint selStart = getSelectionStart(); | ||||||
|     int_t selSize = getSelectionEnd() - selStart + 1; |     dsint selSize = getSelectionEnd() - selStart + 1; | ||||||
|     QClipboard* clipboard = QApplication::clipboard(); |     QClipboard* clipboard = QApplication::clipboard(); | ||||||
|     hexEdit.mHexEdit->setData(clipboard->text()); |     hexEdit.mHexEdit->setData(clipboard->text()); | ||||||
| 
 | 
 | ||||||
|  | @ -566,18 +566,18 @@ void CPUStack::findPattern() | ||||||
|     hexEdit.setWindowTitle("Find Pattern..."); |     hexEdit.setWindowTitle("Find Pattern..."); | ||||||
|     if(hexEdit.exec() != QDialog::Accepted) |     if(hexEdit.exec() != QDialog::Accepted) | ||||||
|         return; |         return; | ||||||
|     int_t addr = rvaToVa(getSelectionStart()); |     dsint addr = rvaToVa(getSelectionStart()); | ||||||
|     if(hexEdit.entireBlock()) |     if(hexEdit.entireBlock()) | ||||||
|         addr = DbgMemFindBaseAddr(addr, 0); |         addr = DbgMemFindBaseAddr(addr, 0); | ||||||
|     QString addrText = QString("%1").arg(addr, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addrText = QString("%1").arg(addr, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("findall " + addrText + ", " + hexEdit.mHexEdit->pattern() + ", &data&").toUtf8().constData()); |     DbgCmdExec(QString("findall " + addrText + ", " + hexEdit.mHexEdit->pattern() + ", &data&").toUtf8().constData()); | ||||||
|     emit displayReferencesWidget(); |     emit displayReferencesWidget(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPUStack::undoSelectionSlot() | void CPUStack::undoSelectionSlot() | ||||||
| { | { | ||||||
|     int_t start = rvaToVa(getSelectionStart()); |     dsint start = rvaToVa(getSelectionStart()); | ||||||
|     int_t end = rvaToVa(getSelectionEnd()); |     dsint end = rvaToVa(getSelectionEnd()); | ||||||
|     if(!DbgFunctions()->PatchInRange(start, end)) //nothing patched in selected range
 |     if(!DbgFunctions()->PatchInRange(start, end)) //nothing patched in selected range
 | ||||||
|         return; |         return; | ||||||
|     DbgFunctions()->PatchRestoreRange(start, end); |     DbgFunctions()->PatchRestoreRange(start, end); | ||||||
|  | @ -586,14 +586,14 @@ void CPUStack::undoSelectionSlot() | ||||||
| 
 | 
 | ||||||
| void CPUStack::modifySlot() | void CPUStack::modifySlot() | ||||||
| { | { | ||||||
|     int_t addr = getInitialSelection(); |     dsint addr = getInitialSelection(); | ||||||
|     WordEditDialog wEditDialog(this); |     WordEditDialog wEditDialog(this); | ||||||
|     int_t value = 0; |     dsint value = 0; | ||||||
|     mMemPage->read(&value, addr, sizeof(int_t)); |     mMemPage->read(&value, addr, sizeof(dsint)); | ||||||
|     wEditDialog.setup("Modify", value, sizeof(int_t)); |     wEditDialog.setup("Modify", value, sizeof(dsint)); | ||||||
|     if(wEditDialog.exec() != QDialog::Accepted) |     if(wEditDialog.exec() != QDialog::Accepted) | ||||||
|         return; |         return; | ||||||
|     value = wEditDialog.getVal(); |     value = wEditDialog.getVal(); | ||||||
|     mMemPage->write(&value, addr, sizeof(int_t)); |     mMemPage->write(&value, addr, sizeof(dsint)); | ||||||
|     reloadData(); |     reloadData(); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -11,7 +11,7 @@ public: | ||||||
|     explicit CPUStack(QWidget* parent = 0); |     explicit CPUStack(QWidget* parent = 0); | ||||||
|     void colorsUpdated(); |     void colorsUpdated(); | ||||||
|     void fontsUpdated(); |     void fontsUpdated(); | ||||||
|     QString paintContent(QPainter* painter, int_t rowBase, int rowOffset, int col, int x, int y, int w, int h); |     QString paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h); | ||||||
|     void contextMenuEvent(QContextMenuEvent* event); |     void contextMenuEvent(QContextMenuEvent* event); | ||||||
|     void mouseDoubleClickEvent(QMouseEvent* event); |     void mouseDoubleClickEvent(QMouseEvent* event); | ||||||
|     void setupContextMenu(); |     void setupContextMenu(); | ||||||
|  | @ -21,7 +21,7 @@ signals: | ||||||
| 
 | 
 | ||||||
| public slots: | public slots: | ||||||
|     void refreshShortcutsSlot(); |     void refreshShortcutsSlot(); | ||||||
|     void stackDumpAt(uint_t addr, uint_t csp); |     void stackDumpAt(duint addr, duint csp); | ||||||
|     void gotoSpSlot(); |     void gotoSpSlot(); | ||||||
|     void gotoBpSlot(); |     void gotoBpSlot(); | ||||||
|     void gotoExpressionSlot(); |     void gotoExpressionSlot(); | ||||||
|  | @ -40,7 +40,7 @@ public slots: | ||||||
|     void modifySlot(); |     void modifySlot(); | ||||||
| 
 | 
 | ||||||
| private: | private: | ||||||
|     uint_t mCsp; |     duint mCsp; | ||||||
| 
 | 
 | ||||||
|     QMenu* mBinaryMenu; |     QMenu* mBinaryMenu; | ||||||
|     QAction* mBinaryEditAction; |     QAction* mBinaryEditAction; | ||||||
|  |  | ||||||
|  | @ -8,10 +8,10 @@ CPUWidget::CPUWidget(QWidget* parent) : QWidget(parent), ui(new Ui::CPUWidget) | ||||||
| 
 | 
 | ||||||
|     mDisas = new CPUDisassembly(0); |     mDisas = new CPUDisassembly(0); | ||||||
|     mSideBar = new CPUSideBar(mDisas); |     mSideBar = new CPUSideBar(mDisas); | ||||||
|     connect(mDisas, SIGNAL(tableOffsetChanged(int_t)), mSideBar, SLOT(changeTopmostAddress(int_t))); |     connect(mDisas, SIGNAL(tableOffsetChanged(dsint)), mSideBar, SLOT(changeTopmostAddress(dsint))); | ||||||
|     connect(mDisas, SIGNAL(viewableRows(int)), mSideBar, SLOT(setViewableRows(int))); |     connect(mDisas, SIGNAL(viewableRows(int)), mSideBar, SLOT(setViewableRows(int))); | ||||||
|     connect(mDisas, SIGNAL(repainted()), mSideBar, SLOT(repaint())); |     connect(mDisas, SIGNAL(repainted()), mSideBar, SLOT(repaint())); | ||||||
|     connect(mDisas, SIGNAL(selectionChanged(int_t)), mSideBar, SLOT(setSelection(int_t))); |     connect(mDisas, SIGNAL(selectionChanged(dsint)), mSideBar, SLOT(setSelection(dsint))); | ||||||
|     connect(Bridge::getBridge(), SIGNAL(dbgStateChanged(DBGSTATE)), mSideBar, SLOT(debugStateChangedSlot(DBGSTATE))); |     connect(Bridge::getBridge(), SIGNAL(dbgStateChanged(DBGSTATE)), mSideBar, SLOT(debugStateChangedSlot(DBGSTATE))); | ||||||
|     connect(Bridge::getBridge(), SIGNAL(updateSideBar()), mSideBar, SLOT(repaint())); |     connect(Bridge::getBridge(), SIGNAL(updateSideBar()), mSideBar, SLOT(repaint())); | ||||||
| 
 | 
 | ||||||
|  | @ -29,7 +29,7 @@ CPUWidget::CPUWidget(QWidget* parent) : QWidget(parent), ui(new Ui::CPUWidget) | ||||||
|     ui->mTopLeftLowerFrame->setMinimumHeight(height + 2); |     ui->mTopLeftLowerFrame->setMinimumHeight(height + 2); | ||||||
|     ui->mTopLeftLowerFrame->setMaximumHeight(height + 2); |     ui->mTopLeftLowerFrame->setMaximumHeight(height + 2); | ||||||
| 
 | 
 | ||||||
|     connect(mDisas, SIGNAL(selectionChanged(int_t)), mInfo, SLOT(disasmSelectionChanged(int_t))); |     connect(mDisas, SIGNAL(selectionChanged(dsint)), mInfo, SLOT(disasmSelectionChanged(dsint))); | ||||||
| 
 | 
 | ||||||
|     mGeneralRegs = new RegistersView(0); |     mGeneralRegs = new RegistersView(0); | ||||||
|     mGeneralRegs->setFixedWidth(1000); |     mGeneralRegs->setFixedWidth(1000); | ||||||
|  |  | ||||||
|  | @ -10,12 +10,12 @@ CalculatorDialog::CalculatorDialog(QWidget* parent) : QDialog(parent), ui(new Ui | ||||||
|     setFixedSize(this->size()); //fixed size
 |     setFixedSize(this->size()); //fixed size
 | ||||||
|     connect(this, SIGNAL(validAddress(bool)), ui->btnGoto, SLOT(setEnabled(bool))); |     connect(this, SIGNAL(validAddress(bool)), ui->btnGoto, SLOT(setEnabled(bool))); | ||||||
|     emit validAddress(false); |     emit validAddress(false); | ||||||
|     ui->txtBin->setInputMask(QString("bbbb ").repeated(sizeof(uint_t) * 2)); |     ui->txtBin->setInputMask(QString("bbbb ").repeated(sizeof(duint) * 2)); | ||||||
|     ui->txtExpression->setText("0"); |     ui->txtExpression->setText("0"); | ||||||
|     ui->txtExpression->selectAll(); |     ui->txtExpression->selectAll(); | ||||||
|     ui->txtExpression->setFocus(); |     ui->txtExpression->setFocus(); | ||||||
|     mValidateThread = new ValidateExpressionThread(this); |     mValidateThread = new ValidateExpressionThread(this); | ||||||
|     connect(mValidateThread, SIGNAL(expressionChanged(bool, bool, int_t)), this, SLOT(expressionChanged(bool, bool, int_t))); |     connect(mValidateThread, SIGNAL(expressionChanged(bool, bool, dsint)), this, SLOT(expressionChanged(bool, bool, dsint))); | ||||||
|     connect(ui->txtExpression, SIGNAL(textChanged(QString)), mValidateThread, SLOT(textChanged(QString))); |     connect(ui->txtExpression, SIGNAL(textChanged(QString)), mValidateThread, SLOT(textChanged(QString))); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -43,7 +43,7 @@ void CalculatorDialog::setExpressionFocus() | ||||||
|     ui->txtExpression->setFocus(); |     ui->txtExpression->setFocus(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CalculatorDialog::expressionChanged(bool validExpression, bool validPointer, int_t value) | void CalculatorDialog::expressionChanged(bool validExpression, bool validPointer, dsint value) | ||||||
| { | { | ||||||
|     if(!validExpression) |     if(!validExpression) | ||||||
|     { |     { | ||||||
|  | @ -108,7 +108,7 @@ void CalculatorDialog::on_txtExpression_textChanged(const QString & arg1) | ||||||
|     emit validAddress(false); |     emit validAddress(false); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| QString CalculatorDialog::inFormat(const uint_t val, CalculatorDialog::NUMBERFORMAT NF) const | QString CalculatorDialog::inFormat(const duint val, CalculatorDialog::NUMBERFORMAT NF) const | ||||||
| { | { | ||||||
|     switch(NF) |     switch(NF) | ||||||
|     { |     { | ||||||
|  | @ -116,14 +116,14 @@ QString CalculatorDialog::inFormat(const uint_t val, CalculatorDialog::NUMBERFOR | ||||||
|     case N_HEX: |     case N_HEX: | ||||||
|         return QString("%1").arg(val, 1, 16, QChar('0')).toUpper(); |         return QString("%1").arg(val, 1, 16, QChar('0')).toUpper(); | ||||||
|     case N_SDEC: |     case N_SDEC: | ||||||
|         return QString("%1").arg((int_t)val); |         return QString("%1").arg((dsint)val); | ||||||
|     case N_UDEC: |     case N_UDEC: | ||||||
|         return QString("%1").arg(val); |         return QString("%1").arg(val); | ||||||
|     case N_BIN: |     case N_BIN: | ||||||
|     { |     { | ||||||
|         QString binary = QString("%1").arg(val, 8 * sizeof(uint_t), 2, QChar('0')).toUpper(); |         QString binary = QString("%1").arg(val, 8 * sizeof(duint), 2, QChar('0')).toUpper(); | ||||||
|         QString ans = ""; |         QString ans = ""; | ||||||
|         for(int i = 0; i < sizeof(uint_t) * 8; i++) |         for(int i = 0; i < sizeof(duint) * 8; i++) | ||||||
|         { |         { | ||||||
|             if((i % 4 == 0) && (i != 0)) |             if((i % 4 == 0) && (i != 0)) | ||||||
|                 ans += " "; |                 ans += " "; | ||||||
|  |  | ||||||
|  | @ -37,7 +37,7 @@ signals: | ||||||
|     void showCpu(); |     void showCpu(); | ||||||
| 
 | 
 | ||||||
| private slots: | private slots: | ||||||
|     void expressionChanged(bool validExpression, bool validPointer, int_t value); |     void expressionChanged(bool validExpression, bool validPointer, dsint value); | ||||||
|     void on_btnGoto_clicked(); |     void on_btnGoto_clicked(); | ||||||
|     void on_txtHex_textEdited(const QString & arg1); |     void on_txtHex_textEdited(const QString & arg1); | ||||||
|     void on_txtSignedDec_textEdited(const QString & arg1); |     void on_txtSignedDec_textEdited(const QString & arg1); | ||||||
|  | @ -51,7 +51,7 @@ private slots: | ||||||
| private: | private: | ||||||
|     ValidateExpressionThread* mValidateThread; |     ValidateExpressionThread* mValidateThread; | ||||||
|     Ui::CalculatorDialog* ui; |     Ui::CalculatorDialog* ui; | ||||||
|     QString inFormat(const uint_t val, CalculatorDialog::NUMBERFORMAT NF) const; |     QString inFormat(const duint val, CalculatorDialog::NUMBERFORMAT NF) const; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| #endif // CALCULATORDIALOG_H
 | #endif // CALCULATORDIALOG_H
 | ||||||
|  |  | ||||||
|  | @ -5,9 +5,9 @@ CallStackView::CallStackView(StdTable* parent) : StdTable(parent) | ||||||
| { | { | ||||||
|     int charwidth = getCharWidth(); |     int charwidth = getCharWidth(); | ||||||
| 
 | 
 | ||||||
|     addColumnAt(8 + charwidth * sizeof(int_t) * 2, "Address", true); //address in the stack
 |     addColumnAt(8 + charwidth * sizeof(dsint) * 2, "Address", true); //address in the stack
 | ||||||
|     addColumnAt(8 + charwidth * sizeof(int_t) * 2, "To", true); //return to
 |     addColumnAt(8 + charwidth * sizeof(dsint) * 2, "To", true); //return to
 | ||||||
|     addColumnAt(8 + charwidth * sizeof(int_t) * 2, "From", true); //return from
 |     addColumnAt(8 + charwidth * sizeof(dsint) * 2, "From", true); //return from
 | ||||||
|     addColumnAt(0, "Comment", true); |     addColumnAt(0, "Comment", true); | ||||||
| 
 | 
 | ||||||
|     connect(Bridge::getBridge(), SIGNAL(updateCallStack()), this, SLOT(updateCallStack())); |     connect(Bridge::getBridge(), SIGNAL(updateCallStack()), this, SLOT(updateCallStack())); | ||||||
|  | @ -38,13 +38,13 @@ void CallStackView::updateCallStack() | ||||||
|     setRowCount(callstack.total); |     setRowCount(callstack.total); | ||||||
|     for(int i = 0; i < callstack.total; i++) |     for(int i = 0; i < callstack.total; i++) | ||||||
|     { |     { | ||||||
|         QString addrText = QString("%1").arg((uint_t)callstack.entries[i].addr, sizeof(uint_t) * 2, 16, QChar('0')).toUpper(); |         QString addrText = QString("%1").arg((duint)callstack.entries[i].addr, sizeof(duint) * 2, 16, QChar('0')).toUpper(); | ||||||
|         setCellContent(i, 0, addrText); |         setCellContent(i, 0, addrText); | ||||||
|         addrText = QString("%1").arg((uint_t)callstack.entries[i].to, sizeof(uint_t) * 2, 16, QChar('0')).toUpper(); |         addrText = QString("%1").arg((duint)callstack.entries[i].to, sizeof(duint) * 2, 16, QChar('0')).toUpper(); | ||||||
|         setCellContent(i, 1, addrText); |         setCellContent(i, 1, addrText); | ||||||
|         if(callstack.entries[i].from) |         if(callstack.entries[i].from) | ||||||
|         { |         { | ||||||
|             addrText = QString("%1").arg((uint_t)callstack.entries[i].from, sizeof(uint_t) * 2, 16, QChar('0')).toUpper(); |             addrText = QString("%1").arg((duint)callstack.entries[i].from, sizeof(duint) * 2, 16, QChar('0')).toUpper(); | ||||||
|             setCellContent(i, 2, addrText); |             setCellContent(i, 2, addrText); | ||||||
|         } |         } | ||||||
|         setCellContent(i, 3, callstack.entries[i].comment); |         setCellContent(i, 3, callstack.entries[i].comment); | ||||||
|  |  | ||||||
|  | @ -21,7 +21,7 @@ GotoDialog::GotoDialog(QWidget* parent) : QDialog(parent), ui(new Ui::GotoDialog | ||||||
|     validRangeEnd = 0; |     validRangeEnd = 0; | ||||||
|     fileOffset = false; |     fileOffset = false; | ||||||
|     mValidateThread = new ValidateExpressionThread(this); |     mValidateThread = new ValidateExpressionThread(this); | ||||||
|     connect(mValidateThread, SIGNAL(expressionChanged(bool, bool, int_t)), this, SLOT(expressionChanged(bool, bool, int_t))); |     connect(mValidateThread, SIGNAL(expressionChanged(bool, bool, dsint)), this, SLOT(expressionChanged(bool, bool, dsint))); | ||||||
|     connect(ui->editExpression, SIGNAL(textEdited(QString)), mValidateThread, SLOT(textChanged(QString))); |     connect(ui->editExpression, SIGNAL(textEdited(QString)), mValidateThread, SLOT(textChanged(QString))); | ||||||
|     connect(this, SIGNAL(finished(int)), this, SLOT(finishedSlot(int))); |     connect(this, SIGNAL(finished(int)), this, SLOT(finishedSlot(int))); | ||||||
| } | } | ||||||
|  | @ -44,7 +44,7 @@ void GotoDialog::hideEvent(QHideEvent* event) | ||||||
|     mValidateThread->wait(); |     mValidateThread->wait(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void GotoDialog::expressionChanged(bool validExpression, bool validPointer, int_t value) | void GotoDialog::expressionChanged(bool validExpression, bool validPointer, dsint value) | ||||||
| { | { | ||||||
|     QString expression = ui->editExpression->text(); |     QString expression = ui->editExpression->text(); | ||||||
|     if(expressionText == expression) |     if(expressionText == expression) | ||||||
|  | @ -63,11 +63,11 @@ void GotoDialog::expressionChanged(bool validExpression, bool validPointer, int_ | ||||||
|     } |     } | ||||||
|     else if(fileOffset) |     else if(fileOffset) | ||||||
|     { |     { | ||||||
|         uint_t offset = value; |         duint offset = value; | ||||||
|         uint_t va = DbgFunctions()->FileOffsetToVa(modName.toUtf8().constData(), offset); |         duint va = DbgFunctions()->FileOffsetToVa(modName.toUtf8().constData(), offset); | ||||||
|         if(va) |         if(va) | ||||||
|         { |         { | ||||||
|             QString addrText = QString("%1").arg(va, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |             QString addrText = QString("%1").arg(va, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|             ui->labelError->setText(QString("<font color='#00DD00'><b>Correct expression! -> </b></font>" + addrText)); |             ui->labelError->setText(QString("<font color='#00DD00'><b>Correct expression! -> </b></font>" + addrText)); | ||||||
|             ui->buttonOk->setEnabled(true); |             ui->buttonOk->setEnabled(true); | ||||||
|             expressionText = expression; |             expressionText = expression; | ||||||
|  | @ -81,7 +81,7 @@ void GotoDialog::expressionChanged(bool validExpression, bool validPointer, int_ | ||||||
|     } |     } | ||||||
|     else |     else | ||||||
|     { |     { | ||||||
|         uint_t addr = value; |         duint addr = value; | ||||||
|         if(!validPointer) |         if(!validPointer) | ||||||
|         { |         { | ||||||
|             ui->labelError->setText("<font color='red'><b>Invalid memory address...</b></font>"); |             ui->labelError->setText("<font color='red'><b>Invalid memory address...</b></font>"); | ||||||
|  | @ -107,9 +107,9 @@ void GotoDialog::expressionChanged(bool validExpression, bool validPointer, int_ | ||||||
|                     addrText = QString(label); |                     addrText = QString(label); | ||||||
|             } |             } | ||||||
|             else if(DbgGetModuleAt(addr, module) && !QString(label).startsWith("JMP.&")) |             else if(DbgGetModuleAt(addr, module) && !QString(label).startsWith("JMP.&")) | ||||||
|                 addrText = QString(module) + "." + QString("%1").arg(addr, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |                 addrText = QString(module) + "." + QString("%1").arg(addr, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|             else |             else | ||||||
|                 addrText = QString("%1").arg(addr, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |                 addrText = QString("%1").arg(addr, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|             ui->labelError->setText(QString("<font color='#00DD00'><b>Correct expression! -> </b></font>" + addrText)); |             ui->labelError->setText(QString("<font color='#00DD00'><b>Correct expression! -> </b></font>" + addrText)); | ||||||
|             ui->buttonOk->setEnabled(true); |             ui->buttonOk->setEnabled(true); | ||||||
|             expressionText = expression; |             expressionText = expression; | ||||||
|  | @ -123,7 +123,7 @@ void GotoDialog::on_editExpression_textChanged(const QString & arg1) | ||||||
|     ui->buttonOk->setEnabled(false); |     ui->buttonOk->setEnabled(false); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool GotoDialog::IsValidMemoryRange(uint_t addr) | bool GotoDialog::IsValidMemoryRange(duint addr) | ||||||
| { | { | ||||||
|     return ((!validRangeStart && !validRangeEnd) || (addr >= validRangeStart && addr < validRangeEnd)); |     return ((!validRangeStart && !validRangeEnd) || (addr >= validRangeStart && addr < validRangeEnd)); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -18,15 +18,15 @@ public: | ||||||
|     explicit GotoDialog(QWidget* parent = 0); |     explicit GotoDialog(QWidget* parent = 0); | ||||||
|     ~GotoDialog(); |     ~GotoDialog(); | ||||||
|     QString expressionText; |     QString expressionText; | ||||||
|     uint_t validRangeStart; |     duint validRangeStart; | ||||||
|     uint_t validRangeEnd; |     duint validRangeEnd; | ||||||
|     bool fileOffset; |     bool fileOffset; | ||||||
|     QString modName; |     QString modName; | ||||||
|     void showEvent(QShowEvent* event); |     void showEvent(QShowEvent* event); | ||||||
|     void hideEvent(QHideEvent* event); |     void hideEvent(QHideEvent* event); | ||||||
| 
 | 
 | ||||||
| private slots: | private slots: | ||||||
|     void expressionChanged(bool validExpression, bool validPointer, int_t value); |     void expressionChanged(bool validExpression, bool validPointer, dsint value); | ||||||
|     void on_editExpression_textChanged(const QString & arg1); |     void on_editExpression_textChanged(const QString & arg1); | ||||||
|     void on_buttonOk_clicked(); |     void on_buttonOk_clicked(); | ||||||
|     void finishedSlot(int result); |     void finishedSlot(int result); | ||||||
|  | @ -34,7 +34,7 @@ private slots: | ||||||
| private: | private: | ||||||
|     Ui::GotoDialog* ui; |     Ui::GotoDialog* ui; | ||||||
|     ValidateExpressionThread* mValidateThread; |     ValidateExpressionThread* mValidateThread; | ||||||
|     bool IsValidMemoryRange(uint_t addr); |     bool IsValidMemoryRange(duint addr); | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| #endif // GOTODIALOG_H
 | #endif // GOTODIALOG_H
 | ||||||
|  |  | ||||||
|  | @ -236,7 +236,7 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent), ui(new Ui::MainWi | ||||||
|     connect(mCpuWidget->mDisas, SIGNAL(displaySourceManagerWidget()), this, SLOT(displaySourceViewWidget())); |     connect(mCpuWidget->mDisas, SIGNAL(displaySourceManagerWidget()), this, SLOT(displaySourceViewWidget())); | ||||||
|     connect(mCpuWidget->mDisas, SIGNAL(displaySnowmanWidget()), this, SLOT(displaySnowmanWidget())); |     connect(mCpuWidget->mDisas, SIGNAL(displaySnowmanWidget()), this, SLOT(displaySnowmanWidget())); | ||||||
|     connect(mCpuWidget->mDisas, SIGNAL(showPatches()), this, SLOT(patchWindow())); |     connect(mCpuWidget->mDisas, SIGNAL(showPatches()), this, SLOT(patchWindow())); | ||||||
|     connect(mCpuWidget->mDisas, SIGNAL(decompileAt(int_t, int_t)), this, SLOT(decompileAt(int_t, int_t))); |     connect(mCpuWidget->mDisas, SIGNAL(decompileAt(dsint, dsint)), this, SLOT(decompileAt(dsint, dsint))); | ||||||
|     connect(mCpuWidget->mDump, SIGNAL(displayReferencesWidget()), this, SLOT(displayReferencesWidget())); |     connect(mCpuWidget->mDump, SIGNAL(displayReferencesWidget()), this, SLOT(displayReferencesWidget())); | ||||||
|     connect(mCpuWidget->mStack, SIGNAL(displayReferencesWidget()), this, SLOT(displayReferencesWidget())); |     connect(mCpuWidget->mStack, SIGNAL(displayReferencesWidget()), this, SLOT(displayReferencesWidget())); | ||||||
|     connect(Config(), SIGNAL(shortcutsUpdated()), this, SLOT(refreshShortcuts())); |     connect(Config(), SIGNAL(shortcutsUpdated()), this, SLOT(refreshShortcuts())); | ||||||
|  | @ -758,13 +758,13 @@ void MainWindow::setLastException(unsigned int exceptionCode) | ||||||
| 
 | 
 | ||||||
| void MainWindow::findStrings() | void MainWindow::findStrings() | ||||||
| { | { | ||||||
|     DbgCmdExec(QString("strref " + QString("%1").arg(mCpuWidget->mDisas->rvaToVa(mCpuWidget->mDisas->getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper()).toUtf8().constData()); |     DbgCmdExec(QString("strref " + QString("%1").arg(mCpuWidget->mDisas->rvaToVa(mCpuWidget->mDisas->getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper()).toUtf8().constData()); | ||||||
|     displayReferencesWidget(); |     displayReferencesWidget(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void MainWindow::findModularCalls() | void MainWindow::findModularCalls() | ||||||
| { | { | ||||||
|     DbgCmdExec(QString("modcallfind " + QString("%1").arg(mCpuWidget->mDisas->rvaToVa(mCpuWidget->mDisas->getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper()).toUtf8().constData()); |     DbgCmdExec(QString("modcallfind " + QString("%1").arg(mCpuWidget->mDisas->rvaToVa(mCpuWidget->mDisas->getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper()).toUtf8().constData()); | ||||||
|     displayReferencesWidget(); |     displayReferencesWidget(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -958,7 +958,7 @@ void MainWindow::runSelection() | ||||||
| { | { | ||||||
|     if(!DbgIsDebugging()) |     if(!DbgIsDebugging()) | ||||||
|         return; |         return; | ||||||
|     QString command = "bp " + QString("%1").arg(mCpuWidget->mDisas->rvaToVa(mCpuWidget->mDisas->getInitialSelection()), sizeof(int_t) * 2, 16, QChar('0')).toUpper() + ", ss"; |     QString command = "bp " + QString("%1").arg(mCpuWidget->mDisas->rvaToVa(mCpuWidget->mDisas->getInitialSelection()), sizeof(dsint) * 2, 16, QChar('0')).toUpper() + ", ss"; | ||||||
|     if(DbgCmdExecDirect(command.toUtf8().constData())) |     if(DbgCmdExecDirect(command.toUtf8().constData())) | ||||||
|         DbgCmdExecDirect("run"); |         DbgCmdExecDirect("run"); | ||||||
| } | } | ||||||
|  | @ -1113,7 +1113,7 @@ void MainWindow::changeCommandLine() | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void MainWindow::decompileAt(int_t start, int_t end) | void MainWindow::decompileAt(dsint start, dsint end) | ||||||
| { | { | ||||||
|     DecompileAt(mSnowmanView, start, end); |     DecompileAt(mSnowmanView, start, end); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -104,7 +104,7 @@ public slots: | ||||||
|     void displayAttach(); |     void displayAttach(); | ||||||
|     void detach(); |     void detach(); | ||||||
|     void changeCommandLine(); |     void changeCommandLine(); | ||||||
|     void decompileAt(int_t start, int_t end); |     void decompileAt(dsint start, dsint end); | ||||||
|     void canClose(); |     void canClose(); | ||||||
|     void addQWidgetTab(QWidget* qWidget); |     void addQWidgetTab(QWidget* qWidget); | ||||||
|     void showQWidgetTab(QWidget* qWidget); |     void showQWidgetTab(QWidget* qWidget); | ||||||
|  |  | ||||||
|  | @ -12,8 +12,8 @@ MemoryMapView::MemoryMapView(StdTable* parent) : StdTable(parent) | ||||||
| 
 | 
 | ||||||
|     int charwidth = getCharWidth(); |     int charwidth = getCharWidth(); | ||||||
| 
 | 
 | ||||||
|     addColumnAt(8 + charwidth * 2 * sizeof(uint_t), "Address", false, "Address"); //addr
 |     addColumnAt(8 + charwidth * 2 * sizeof(duint), "Address", false, "Address"); //addr
 | ||||||
|     addColumnAt(8 + charwidth * 2 * sizeof(uint_t), "Size", false, "Size"); //size
 |     addColumnAt(8 + charwidth * 2 * sizeof(duint), "Size", false, "Size"); //size
 | ||||||
|     addColumnAt(8 + charwidth * 32, "Info", false, "Page Information"); //page information
 |     addColumnAt(8 + charwidth * 32, "Info", false, "Page Information"); //page information
 | ||||||
|     addColumnAt(8 + charwidth * 5, "Type", false, "Allocation Type"); //allocation type
 |     addColumnAt(8 + charwidth * 5, "Type", false, "Allocation Type"); //allocation type
 | ||||||
|     addColumnAt(8 + charwidth * 11, "Protection", false, "Current Protection"); //current protection
 |     addColumnAt(8 + charwidth * 11, "Protection", false, "Current Protection"); //current protection
 | ||||||
|  | @ -146,9 +146,9 @@ void MemoryMapView::contextMenuSlot(const QPoint & pos) | ||||||
| 
 | 
 | ||||||
|     QString wStr = getCellContent(getInitialSelection(), 0); |     QString wStr = getCellContent(getInitialSelection(), 0); | ||||||
| #ifdef _WIN64 | #ifdef _WIN64 | ||||||
|     uint_t selectedAddr = wStr.toULongLong(0, 16); |     duint selectedAddr = wStr.toULongLong(0, 16); | ||||||
| #else //x86
 | #else //x86
 | ||||||
|     uint_t selectedAddr = wStr.toULong(0, 16); |     duint selectedAddr = wStr.toULong(0, 16); | ||||||
| #endif //_WIN64
 | #endif //_WIN64
 | ||||||
|     if((DbgGetBpxTypeAt(selectedAddr)&bp_memory) == bp_memory) //memory breakpoint set
 |     if((DbgGetBpxTypeAt(selectedAddr)&bp_memory) == bp_memory) //memory breakpoint set
 | ||||||
|     { |     { | ||||||
|  | @ -179,15 +179,15 @@ QString MemoryMapView::getProtectionString(DWORD Protect) | ||||||
|     return QString(rights); |     return QString(rights); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| QString MemoryMapView::paintContent(QPainter* painter, int_t rowBase, int rowOffset, int col, int x, int y, int w, int h) | QString MemoryMapView::paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h) | ||||||
| { | { | ||||||
|     if(col == 0) //address
 |     if(col == 0) //address
 | ||||||
|     { |     { | ||||||
|         QString wStr = getCellContent(rowBase + rowOffset, col); |         QString wStr = getCellContent(rowBase + rowOffset, col); | ||||||
| #ifdef _WIN64 | #ifdef _WIN64 | ||||||
|         uint_t addr = wStr.toULongLong(0, 16); |         duint addr = wStr.toULongLong(0, 16); | ||||||
| #else //x86
 | #else //x86
 | ||||||
|         uint_t addr = wStr.toULong(0, 16); |         duint addr = wStr.toULong(0, 16); | ||||||
| #endif //_WIN64
 | #endif //_WIN64
 | ||||||
|         if((DbgGetBpxTypeAt(addr)&bp_memory) == bp_memory) |         if((DbgGetBpxTypeAt(addr)&bp_memory) == bp_memory) | ||||||
|         { |         { | ||||||
|  | @ -242,11 +242,11 @@ void MemoryMapView::refreshMap() | ||||||
|         MEMORY_BASIC_INFORMATION wMbi = (wMemMapStruct.page)[wI].mbi; |         MEMORY_BASIC_INFORMATION wMbi = (wMemMapStruct.page)[wI].mbi; | ||||||
| 
 | 
 | ||||||
|         // Base address
 |         // Base address
 | ||||||
|         wS = QString("%1").arg((uint_t)wMbi.BaseAddress, sizeof(uint_t) * 2, 16, QChar('0')).toUpper(); |         wS = QString("%1").arg((duint)wMbi.BaseAddress, sizeof(duint) * 2, 16, QChar('0')).toUpper(); | ||||||
|         setCellContent(wI, 0, wS); |         setCellContent(wI, 0, wS); | ||||||
| 
 | 
 | ||||||
|         // Size
 |         // Size
 | ||||||
|         wS = QString("%1").arg((uint_t)wMbi.RegionSize, sizeof(uint_t) * 2, 16, QChar('0')).toUpper(); |         wS = QString("%1").arg((duint)wMbi.RegionSize, sizeof(duint) * 2, 16, QChar('0')).toUpper(); | ||||||
|         setCellContent(wI, 1, wS); |         setCellContent(wI, 1, wS); | ||||||
| 
 | 
 | ||||||
|         // Information
 |         // Information
 | ||||||
|  | @ -386,9 +386,9 @@ void MemoryMapView::memoryExecuteSingleshootToggleSlot() | ||||||
| { | { | ||||||
|     QString addr_text = getCellContent(getInitialSelection(), 0); |     QString addr_text = getCellContent(getInitialSelection(), 0); | ||||||
| #ifdef _WIN64 | #ifdef _WIN64 | ||||||
|     uint_t selectedAddr = addr_text.toULongLong(0, 16); |     duint selectedAddr = addr_text.toULongLong(0, 16); | ||||||
| #else //x86
 | #else //x86
 | ||||||
|     uint_t selectedAddr = addr_text.toULong(0, 16); |     duint selectedAddr = addr_text.toULong(0, 16); | ||||||
| #endif //_WIN64
 | #endif //_WIN64
 | ||||||
|     if((DbgGetBpxTypeAt(selectedAddr)&bp_memory) == bp_memory) //memory breakpoint set
 |     if((DbgGetBpxTypeAt(selectedAddr)&bp_memory) == bp_memory) //memory breakpoint set
 | ||||||
|         memoryRemoveSlot(); |         memoryRemoveSlot(); | ||||||
|  | @ -400,8 +400,8 @@ void MemoryMapView::pageMemoryRights() | ||||||
| { | { | ||||||
|     PageMemoryRights PageMemoryRightsDialog(this); |     PageMemoryRights PageMemoryRightsDialog(this); | ||||||
|     connect(&PageMemoryRightsDialog, SIGNAL(refreshMemoryMap()), this, SLOT(refreshMap())); |     connect(&PageMemoryRightsDialog, SIGNAL(refreshMemoryMap()), this, SLOT(refreshMap())); | ||||||
|     uint_t addr = getCellContent(getInitialSelection(), 0).toULongLong(0, 16); |     duint addr = getCellContent(getInitialSelection(), 0).toULongLong(0, 16); | ||||||
|     uint_t size = getCellContent(getInitialSelection(), 1).toULongLong(0, 16); |     duint size = getCellContent(getInitialSelection(), 1).toULongLong(0, 16); | ||||||
|     PageMemoryRightsDialog.RunAddrSize(addr, size, getCellContent(getInitialSelection(), 3)); |     PageMemoryRightsDialog.RunAddrSize(addr, size, getCellContent(getInitialSelection(), 3)); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -418,8 +418,8 @@ void MemoryMapView::switchView() | ||||||
| 
 | 
 | ||||||
| void MemoryMapView::entropy() | void MemoryMapView::entropy() | ||||||
| { | { | ||||||
|     uint_t addr = getCellContent(getInitialSelection(), 0).toULongLong(0, 16); |     duint addr = getCellContent(getInitialSelection(), 0).toULongLong(0, 16); | ||||||
|     uint_t size = getCellContent(getInitialSelection(), 1).toULongLong(0, 16); |     duint size = getCellContent(getInitialSelection(), 1).toULongLong(0, 16); | ||||||
|     unsigned char* data = new unsigned char[size]; |     unsigned char* data = new unsigned char[size]; | ||||||
|     DbgMemRead(addr, data, size); |     DbgMemRead(addr, data, size); | ||||||
| 
 | 
 | ||||||
|  | @ -440,10 +440,10 @@ void MemoryMapView::findPatternSlot() | ||||||
|     hexEdit.setWindowTitle("Find Pattern..."); |     hexEdit.setWindowTitle("Find Pattern..."); | ||||||
|     if(hexEdit.exec() != QDialog::Accepted) |     if(hexEdit.exec() != QDialog::Accepted) | ||||||
|         return; |         return; | ||||||
|     uint_t addr = getCellContent(getInitialSelection(), 0).toULongLong(0, 16); |     duint addr = getCellContent(getInitialSelection(), 0).toULongLong(0, 16); | ||||||
|     if(hexEdit.entireBlock()) |     if(hexEdit.entireBlock()) | ||||||
|         addr = 0; |         addr = 0; | ||||||
|     QString addrText = QString("%1").arg(addr, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addrText = QString("%1").arg(addr, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExec(QString("findmemall " + addrText + ", \"" + hexEdit.mHexEdit->pattern() + "\", &data&").toUtf8().constData()); |     DbgCmdExec(QString("findmemall " + addrText + ", \"" + hexEdit.mHexEdit->pattern() + "\", &data&").toUtf8().constData()); | ||||||
|     emit showReferences(); |     emit showReferences(); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -8,7 +8,7 @@ class MemoryMapView : public StdTable | ||||||
|     Q_OBJECT |     Q_OBJECT | ||||||
| public: | public: | ||||||
|     explicit MemoryMapView(StdTable* parent = 0); |     explicit MemoryMapView(StdTable* parent = 0); | ||||||
|     QString paintContent(QPainter* painter, int_t rowBase, int rowOffset, int col, int x, int y, int w, int h); |     QString paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h); | ||||||
|     void setupContextMenu(); |     void setupContextMenu(); | ||||||
| 
 | 
 | ||||||
| signals: | signals: | ||||||
|  |  | ||||||
|  | @ -18,7 +18,7 @@ PageMemoryRights::~PageMemoryRights() | ||||||
|     delete ui; |     delete ui; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void PageMemoryRights::RunAddrSize(uint_t addrin, uint_t sizein, QString pagetypein) | void PageMemoryRights::RunAddrSize(duint addrin, duint sizein, QString pagetypein) | ||||||
| { | { | ||||||
|     addr = addrin; |     addr = addrin; | ||||||
|     size = sizein; |     size = sizein; | ||||||
|  | @ -26,7 +26,7 @@ void PageMemoryRights::RunAddrSize(uint_t addrin, uint_t sizein, QString pagetyp | ||||||
| 
 | 
 | ||||||
|     QTableWidget* tableWidget = ui->pagetableWidget; |     QTableWidget* tableWidget = ui->pagetableWidget; | ||||||
|     tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows); |     tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows); | ||||||
|     uint_t nr_pages = size / PAGE_SIZE; |     duint nr_pages = size / PAGE_SIZE; | ||||||
|     tableWidget->setColumnCount(2); |     tableWidget->setColumnCount(2); | ||||||
|     tableWidget->setRowCount(nr_pages); |     tableWidget->setRowCount(nr_pages); | ||||||
|     tableWidget->setHorizontalHeaderItem(0, new QTableWidgetItem(QString("Address"))); |     tableWidget->setHorizontalHeaderItem(0, new QTableWidgetItem(QString("Address"))); | ||||||
|  | @ -34,10 +34,10 @@ void PageMemoryRights::RunAddrSize(uint_t addrin, uint_t sizein, QString pagetyp | ||||||
| 
 | 
 | ||||||
|     duint actual_addr; |     duint actual_addr; | ||||||
|     char rights[RIGHTS_STRING_SIZE]; |     char rights[RIGHTS_STRING_SIZE]; | ||||||
|     for(uint_t i = 0; i < nr_pages; i++) |     for(duint i = 0; i < nr_pages; i++) | ||||||
|     { |     { | ||||||
|         actual_addr = addr + (i * PAGE_SIZE); |         actual_addr = addr + (i * PAGE_SIZE); | ||||||
|         tableWidget->setItem(i, 0, new QTableWidgetItem(QString("%1").arg(actual_addr, sizeof(uint_t) * 2, 16, QChar('0')).toUpper())); |         tableWidget->setItem(i, 0, new QTableWidgetItem(QString("%1").arg(actual_addr, sizeof(duint) * 2, 16, QChar('0')).toUpper())); | ||||||
|         if(DbgFunctions()->GetPageRights(actual_addr, rights)) |         if(DbgFunctions()->GetPageRights(actual_addr, rights)) | ||||||
|             tableWidget->setItem(i, 1, new QTableWidgetItem(QString(rights))); |             tableWidget->setItem(i, 1, new QTableWidgetItem(QString(rights))); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | @ -15,7 +15,7 @@ class PageMemoryRights : public QDialog | ||||||
| 
 | 
 | ||||||
| public: | public: | ||||||
|     explicit PageMemoryRights(QWidget* parent = 0); |     explicit PageMemoryRights(QWidget* parent = 0); | ||||||
|     void RunAddrSize(uint_t, uint_t, QString); |     void RunAddrSize(duint, duint, QString); | ||||||
|     ~PageMemoryRights(); |     ~PageMemoryRights(); | ||||||
| 
 | 
 | ||||||
| private slots: | private slots: | ||||||
|  | @ -28,8 +28,8 @@ signals: | ||||||
| 
 | 
 | ||||||
| private: | private: | ||||||
|     Ui::PageMemoryRights* ui; |     Ui::PageMemoryRights* ui; | ||||||
|     uint_t addr; |     duint addr; | ||||||
|     uint_t size; |     duint size; | ||||||
|     QString pagetype; |     QString pagetype; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -72,7 +72,7 @@ bool PatchDialog::hasNextGroup(const PatchInfoList & patchList, int group) | ||||||
|     return false; |     return false; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| int_t PatchDialog::getGroupAddress(const PatchInfoList & patchList, int group) | dsint PatchDialog::getGroupAddress(const PatchInfoList & patchList, int group) | ||||||
| { | { | ||||||
|     for(int i = 0; i < patchList.size(); i++) |     for(int i = 0; i < patchList.size(); i++) | ||||||
|         if(patchList.at(i).second.group == group) |         if(patchList.at(i).second.group == group) | ||||||
|  | @ -185,11 +185,11 @@ void PatchDialog::groupToggle() | ||||||
|     } |     } | ||||||
|     GuiUpdateAllViews(); |     GuiUpdateAllViews(); | ||||||
|     mIsWorking = false; |     mIsWorking = false; | ||||||
|     int_t groupStart = getGroupAddress(curPatchList, group); |     dsint groupStart = getGroupAddress(curPatchList, group); | ||||||
|     if(!groupStart) |     if(!groupStart) | ||||||
|         return; |         return; | ||||||
|     QString color = enabled ? "#00DD00" : "red"; |     QString color = enabled ? "#00DD00" : "red"; | ||||||
|     QString addrText = QString("%1").arg(groupStart, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addrText = QString("%1").arg(groupStart, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     QString title = "<font color='" + color + "'><b>" + QString().sprintf("%d:", group) + addrText + "</b></font>"; |     QString title = "<font color='" + color + "'><b>" + QString().sprintf("%d:", group) + addrText + "</b></font>"; | ||||||
|     mGroupSelector->setGroupTitle(title); |     mGroupSelector->setGroupTitle(title); | ||||||
|     DbgCmdExecDirect(QString("disasm " + addrText).toUtf8().constData()); |     DbgCmdExecDirect(QString("disasm " + addrText).toUtf8().constData()); | ||||||
|  | @ -210,7 +210,7 @@ void PatchDialog::groupPrevious() | ||||||
|         return; |         return; | ||||||
|     group--; |     group--; | ||||||
|     QString color = isGroupEnabled(curPatchList, group) ? "#00DD00" : "red"; |     QString color = isGroupEnabled(curPatchList, group) ? "#00DD00" : "red"; | ||||||
|     QString addrText = QString("%1").arg(getGroupAddress(curPatchList, group), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addrText = QString("%1").arg(getGroupAddress(curPatchList, group), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     QString title = "<font color='" + color + "'><b>" + QString().sprintf("%d:", group) + addrText + "</b></font>"; |     QString title = "<font color='" + color + "'><b>" + QString().sprintf("%d:", group) + addrText + "</b></font>"; | ||||||
|     mGroupSelector->setGroupTitle(title); |     mGroupSelector->setGroupTitle(title); | ||||||
|     mGroupSelector->setGroup(group); |     mGroupSelector->setGroup(group); | ||||||
|  | @ -235,7 +235,7 @@ void PatchDialog::groupNext() | ||||||
|         return; |         return; | ||||||
|     group++; |     group++; | ||||||
|     QString color = isGroupEnabled(curPatchList, group) ? "#00DD00" : "red"; |     QString color = isGroupEnabled(curPatchList, group) ? "#00DD00" : "red"; | ||||||
|     QString addrText = QString("%1").arg(getGroupAddress(curPatchList, group), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addrText = QString("%1").arg(getGroupAddress(curPatchList, group), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     QString title = "<font color='" + color + "'><b>" + QString().sprintf("%d:", group) + addrText + "</b></font>"; |     QString title = "<font color='" + color + "'><b>" + QString().sprintf("%d:", group) + addrText + "</b></font>"; | ||||||
|     mGroupSelector->setGroupTitle(title); |     mGroupSelector->setGroupTitle(title); | ||||||
|     mGroupSelector->setGroup(group); |     mGroupSelector->setGroup(group); | ||||||
|  | @ -260,7 +260,7 @@ void PatchDialog::on_listModules_itemSelectionChanged() | ||||||
|     for(int i = 0; i < patchList.size(); i++) |     for(int i = 0; i < patchList.size(); i++) | ||||||
|     { |     { | ||||||
|         const DBGPATCHINFO curPatch = patchList.at(i).first; |         const DBGPATCHINFO curPatch = patchList.at(i).first; | ||||||
|         QString addrText = QString("%1").arg(curPatch.addr, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         QString addrText = QString("%1").arg(curPatch.addr, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|         QListWidgetItem* item = new QListWidgetItem(QString().sprintf("%d", patchList.at(i).second.group).rightJustified(4, ' ', true) + "|" + addrText + QString().sprintf(":%.2X->%.2X", curPatch.oldbyte, curPatch.newbyte), ui->listPatches); |         QListWidgetItem* item = new QListWidgetItem(QString().sprintf("%d", patchList.at(i).second.group).rightJustified(4, ' ', true) + "|" + addrText + QString().sprintf(":%.2X->%.2X", curPatch.oldbyte, curPatch.newbyte), ui->listPatches); | ||||||
|         item->setFlags(item->flags() | Qt::ItemIsUserCheckable); |         item->setFlags(item->flags() | Qt::ItemIsUserCheckable); | ||||||
|         Qt::CheckState state = patchList.at(i).second.checked ? Qt::Checked : Qt::Unchecked; |         Qt::CheckState state = patchList.at(i).second.checked ? Qt::Checked : Qt::Unchecked; | ||||||
|  | @ -306,7 +306,7 @@ void PatchDialog::on_listPatches_itemChanged(QListWidgetItem* item) //checkbox c | ||||||
|     GuiUpdateAllViews(); |     GuiUpdateAllViews(); | ||||||
|     int group = mGroupSelector->group(); |     int group = mGroupSelector->group(); | ||||||
|     QString color = isGroupEnabled(curPatchList, group) ? "#00DD00" : "red"; |     QString color = isGroupEnabled(curPatchList, group) ? "#00DD00" : "red"; | ||||||
|     QString addrText = QString("%1").arg(getGroupAddress(curPatchList, group), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addrText = QString("%1").arg(getGroupAddress(curPatchList, group), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     QString title = "<font color='" + color + "'><b>" + QString().sprintf("%d:", group) + addrText + "</b></font>"; |     QString title = "<font color='" + color + "'><b>" + QString().sprintf("%d:", group) + addrText + "</b></font>"; | ||||||
|     mGroupSelector->setGroupTitle(title); |     mGroupSelector->setGroupTitle(title); | ||||||
|     mGroupSelector->setPreviousEnabled(hasPreviousGroup(curPatchList, group)); |     mGroupSelector->setPreviousEnabled(hasPreviousGroup(curPatchList, group)); | ||||||
|  | @ -393,10 +393,10 @@ void PatchDialog::on_listPatches_itemSelectionChanged() | ||||||
|         return; |         return; | ||||||
|     PatchInfoList & curPatchList = found.value(); |     PatchInfoList & curPatchList = found.value(); | ||||||
|     PatchPair & patch = curPatchList[ui->listPatches->row(ui->listPatches->selectedItems().at(0))]; //selected item
 |     PatchPair & patch = curPatchList[ui->listPatches->row(ui->listPatches->selectedItems().at(0))]; //selected item
 | ||||||
|     int_t groupStart = getGroupAddress(curPatchList, patch.second.group); |     dsint groupStart = getGroupAddress(curPatchList, patch.second.group); | ||||||
|     if(!groupStart) |     if(!groupStart) | ||||||
|         return; |         return; | ||||||
|     QString addrText = QString("%1").arg(groupStart, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addrText = QString("%1").arg(groupStart, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     DbgCmdExecDirect(QString("disasm " + addrText).toUtf8().constData()); |     DbgCmdExecDirect(QString("disasm " + addrText).toUtf8().constData()); | ||||||
|     DbgCmdExecDirect(QString("dump " + addrText).toUtf8().constData()); |     DbgCmdExecDirect(QString("dump " + addrText).toUtf8().constData()); | ||||||
| } | } | ||||||
|  | @ -416,7 +416,7 @@ void PatchDialog::on_btnPickGroups_clicked() | ||||||
| 
 | 
 | ||||||
|     int group = mGroupSelector->group(); |     int group = mGroupSelector->group(); | ||||||
|     QString color = isGroupEnabled(curPatchList, group) ? "#00DD00" : "red"; |     QString color = isGroupEnabled(curPatchList, group) ? "#00DD00" : "red"; | ||||||
|     QString addrText = QString("%1").arg(getGroupAddress(curPatchList, group), sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |     QString addrText = QString("%1").arg(getGroupAddress(curPatchList, group), sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     QString title = "<font color='" + color + "'><b>" + QString().sprintf("%d:", group) + addrText + "</b></font>"; |     QString title = "<font color='" + color + "'><b>" + QString().sprintf("%d:", group) + addrText + "</b></font>"; | ||||||
|     mGroupSelector->setGroupTitle(title); |     mGroupSelector->setGroupTitle(title); | ||||||
|     mGroupSelector->setPreviousEnabled(hasPreviousGroup(curPatchList, group)); |     mGroupSelector->setPreviousEnabled(hasPreviousGroup(curPatchList, group)); | ||||||
|  | @ -525,7 +525,7 @@ void PatchDialog::on_btnImport_clicked() | ||||||
|     } IMPORTSTATUS; |     } IMPORTSTATUS; | ||||||
|     QList<QPair<DBGPATCHINFO, IMPORTSTATUS>> patchList; |     QList<QPair<DBGPATCHINFO, IMPORTSTATUS>> patchList; | ||||||
|     DBGPATCHINFO curPatch; |     DBGPATCHINFO curPatch; | ||||||
|     int_t modbase = 0; |     dsint modbase = 0; | ||||||
|     bool bBadOriginal = false; |     bool bBadOriginal = false; | ||||||
|     bool bAlreadyDone = false; |     bool bAlreadyDone = false; | ||||||
|     for(int i = 0; i < lines.size(); i++) |     for(int i = 0; i < lines.size(); i++) | ||||||
|  | @ -647,7 +647,7 @@ void PatchDialog::on_btnExport_clicked() | ||||||
|     { |     { | ||||||
|         const PatchInfoList & curPatchList = i.value(); |         const PatchInfoList & curPatchList = i.value(); | ||||||
|         bool bModPlaced = false; |         bool bModPlaced = false; | ||||||
|         int_t modbase = DbgFunctions()->ModBaseFromName(i.key().toUtf8().constData()); |         dsint modbase = DbgFunctions()->ModBaseFromName(i.key().toUtf8().constData()); | ||||||
|         if(!modbase) |         if(!modbase) | ||||||
|             continue; |             continue; | ||||||
|         for(int j = 0; j < curPatchList.size(); j++) |         for(int j = 0; j < curPatchList.size(); j++) | ||||||
|  | @ -659,7 +659,7 @@ void PatchDialog::on_btnExport_clicked() | ||||||
|                 lines.push_back(">" + i.key()); |                 lines.push_back(">" + i.key()); | ||||||
|                 bModPlaced = true; |                 bModPlaced = true; | ||||||
|             } |             } | ||||||
|             QString addrText = QString("%1").arg(curPatchList.at(j).first.addr - modbase, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |             QString addrText = QString("%1").arg(curPatchList.at(j).first.addr - modbase, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|             lines.push_back(addrText + QString().sprintf(":%.2X->%.2X", curPatchList.at(j).first.oldbyte, curPatchList.at(j).first.newbyte)); |             lines.push_back(addrText + QString().sprintf(":%.2X->%.2X", curPatchList.at(j).first.oldbyte, curPatchList.at(j).first.newbyte)); | ||||||
|             patches++; |             patches++; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  | @ -44,7 +44,7 @@ private: | ||||||
|     bool isGroupEnabled(const PatchInfoList & patchList, int group); |     bool isGroupEnabled(const PatchInfoList & patchList, int group); | ||||||
|     bool hasPreviousGroup(const PatchInfoList & patchList, int group); |     bool hasPreviousGroup(const PatchInfoList & patchList, int group); | ||||||
|     bool hasNextGroup(const PatchInfoList & patchList, int group); |     bool hasNextGroup(const PatchInfoList & patchList, int group); | ||||||
|     int_t getGroupAddress(const PatchInfoList & patchList, int group); |     dsint getGroupAddress(const PatchInfoList & patchList, int group); | ||||||
| 
 | 
 | ||||||
| private slots: | private slots: | ||||||
|     void dbgStateChanged(DBGSTATE state); |     void dbgStateChanged(DBGSTATE state); | ||||||
|  |  | ||||||
|  | @ -25,77 +25,77 @@ void RegistersView::InitMappings() | ||||||
|      */ |      */ | ||||||
| #ifdef _WIN64 | #ifdef _WIN64 | ||||||
|     mRegisterMapping.insert(CAX, "RAX"); |     mRegisterMapping.insert(CAX, "RAX"); | ||||||
|     mRegisterPlaces.insert(CAX, Register_Position(offset++, 0, 6, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(CAX, Register_Position(offset++, 0, 6, sizeof(duint) * 2)); | ||||||
|     mRegisterMapping.insert(CBX, "RBX"); |     mRegisterMapping.insert(CBX, "RBX"); | ||||||
|     mRegisterPlaces.insert(CBX, Register_Position(offset++, 0, 6, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(CBX, Register_Position(offset++, 0, 6, sizeof(duint) * 2)); | ||||||
|     mRegisterMapping.insert(CCX, "RCX"); |     mRegisterMapping.insert(CCX, "RCX"); | ||||||
|     mRegisterPlaces.insert(CCX, Register_Position(offset++, 0, 6, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(CCX, Register_Position(offset++, 0, 6, sizeof(duint) * 2)); | ||||||
|     mRegisterMapping.insert(CDX, "RDX"); |     mRegisterMapping.insert(CDX, "RDX"); | ||||||
|     mRegisterPlaces.insert(CDX, Register_Position(offset++, 0, 6, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(CDX, Register_Position(offset++, 0, 6, sizeof(duint) * 2)); | ||||||
|     mRegisterMapping.insert(CBP, "RBP"); |     mRegisterMapping.insert(CBP, "RBP"); | ||||||
|     mRegisterPlaces.insert(CBP, Register_Position(offset++, 0, 6, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(CBP, Register_Position(offset++, 0, 6, sizeof(duint) * 2)); | ||||||
|     mRegisterMapping.insert(CSP, "RSP"); |     mRegisterMapping.insert(CSP, "RSP"); | ||||||
|     mRegisterPlaces.insert(CSP, Register_Position(offset++, 0, 6, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(CSP, Register_Position(offset++, 0, 6, sizeof(duint) * 2)); | ||||||
|     mRegisterMapping.insert(CSI, "RSI"); |     mRegisterMapping.insert(CSI, "RSI"); | ||||||
|     mRegisterPlaces.insert(CSI, Register_Position(offset++, 0, 6, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(CSI, Register_Position(offset++, 0, 6, sizeof(duint) * 2)); | ||||||
|     mRegisterMapping.insert(CDI, "RDI"); |     mRegisterMapping.insert(CDI, "RDI"); | ||||||
|     mRegisterPlaces.insert(CDI, Register_Position(offset++, 0, 6, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(CDI, Register_Position(offset++, 0, 6, sizeof(duint) * 2)); | ||||||
| 
 | 
 | ||||||
|     offset++; |     offset++; | ||||||
| 
 | 
 | ||||||
|     mRegisterMapping.insert(R8, "R8"); |     mRegisterMapping.insert(R8, "R8"); | ||||||
|     mRegisterPlaces.insert(R8 , Register_Position(offset++, 0, 6, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(R8 , Register_Position(offset++, 0, 6, sizeof(duint) * 2)); | ||||||
|     mRegisterMapping.insert(R9, "R9"); |     mRegisterMapping.insert(R9, "R9"); | ||||||
|     mRegisterPlaces.insert(R9 , Register_Position(offset++, 0, 6, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(R9 , Register_Position(offset++, 0, 6, sizeof(duint) * 2)); | ||||||
|     mRegisterMapping.insert(R10, "R10"); |     mRegisterMapping.insert(R10, "R10"); | ||||||
|     mRegisterPlaces.insert(R10, Register_Position(offset++, 0, 6, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(R10, Register_Position(offset++, 0, 6, sizeof(duint) * 2)); | ||||||
|     mRegisterMapping.insert(R11, "R11"); |     mRegisterMapping.insert(R11, "R11"); | ||||||
|     mRegisterPlaces.insert(R11, Register_Position(offset++, 0, 6, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(R11, Register_Position(offset++, 0, 6, sizeof(duint) * 2)); | ||||||
|     mRegisterMapping.insert(R12, "R12"); |     mRegisterMapping.insert(R12, "R12"); | ||||||
|     mRegisterPlaces.insert(R12, Register_Position(offset++, 0, 6, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(R12, Register_Position(offset++, 0, 6, sizeof(duint) * 2)); | ||||||
|     mRegisterMapping.insert(R13, "R13"); |     mRegisterMapping.insert(R13, "R13"); | ||||||
|     mRegisterPlaces.insert(R13, Register_Position(offset++, 0, 6, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(R13, Register_Position(offset++, 0, 6, sizeof(duint) * 2)); | ||||||
|     mRegisterMapping.insert(R14, "R14"); |     mRegisterMapping.insert(R14, "R14"); | ||||||
|     mRegisterPlaces.insert(R14, Register_Position(offset++, 0, 6, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(R14, Register_Position(offset++, 0, 6, sizeof(duint) * 2)); | ||||||
|     mRegisterMapping.insert(R15, "R15"); |     mRegisterMapping.insert(R15, "R15"); | ||||||
|     mRegisterPlaces.insert(R15, Register_Position(offset++, 0, 6, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(R15, Register_Position(offset++, 0, 6, sizeof(duint) * 2)); | ||||||
| 
 | 
 | ||||||
|     offset++; |     offset++; | ||||||
| 
 | 
 | ||||||
|     mRegisterMapping.insert(CIP, "RIP"); |     mRegisterMapping.insert(CIP, "RIP"); | ||||||
|     mRegisterPlaces.insert(CIP, Register_Position(offset++, 0, 6, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(CIP, Register_Position(offset++, 0, 6, sizeof(duint) * 2)); | ||||||
| 
 | 
 | ||||||
|     offset++; |     offset++; | ||||||
| 
 | 
 | ||||||
|     mRegisterMapping.insert(EFLAGS, "RFLAGS"); |     mRegisterMapping.insert(EFLAGS, "RFLAGS"); | ||||||
|     mRegisterPlaces.insert(EFLAGS, Register_Position(offset++, 0, 9, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(EFLAGS, Register_Position(offset++, 0, 9, sizeof(duint) * 2)); | ||||||
| #else //x32
 | #else //x32
 | ||||||
|     mRegisterMapping.insert(CAX, "EAX"); |     mRegisterMapping.insert(CAX, "EAX"); | ||||||
|     mRegisterPlaces.insert(CAX, Register_Position(offset++, 0, 6, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(CAX, Register_Position(offset++, 0, 6, sizeof(duint) * 2)); | ||||||
|     mRegisterMapping.insert(CBX, "EBX"); |     mRegisterMapping.insert(CBX, "EBX"); | ||||||
|     mRegisterPlaces.insert(CBX, Register_Position(offset++, 0, 6, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(CBX, Register_Position(offset++, 0, 6, sizeof(duint) * 2)); | ||||||
|     mRegisterMapping.insert(CCX, "ECX"); |     mRegisterMapping.insert(CCX, "ECX"); | ||||||
|     mRegisterPlaces.insert(CCX, Register_Position(offset++, 0, 6, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(CCX, Register_Position(offset++, 0, 6, sizeof(duint) * 2)); | ||||||
|     mRegisterMapping.insert(CDX, "EDX"); |     mRegisterMapping.insert(CDX, "EDX"); | ||||||
|     mRegisterPlaces.insert(CDX, Register_Position(offset++, 0, 6, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(CDX, Register_Position(offset++, 0, 6, sizeof(duint) * 2)); | ||||||
|     mRegisterMapping.insert(CBP, "EBP"); |     mRegisterMapping.insert(CBP, "EBP"); | ||||||
|     mRegisterPlaces.insert(CBP, Register_Position(offset++, 0, 6, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(CBP, Register_Position(offset++, 0, 6, sizeof(duint) * 2)); | ||||||
|     mRegisterMapping.insert(CSP, "ESP"); |     mRegisterMapping.insert(CSP, "ESP"); | ||||||
|     mRegisterPlaces.insert(CSP, Register_Position(offset++, 0, 6, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(CSP, Register_Position(offset++, 0, 6, sizeof(duint) * 2)); | ||||||
|     mRegisterMapping.insert(CSI, "ESI"); |     mRegisterMapping.insert(CSI, "ESI"); | ||||||
|     mRegisterPlaces.insert(CSI, Register_Position(offset++, 0, 6, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(CSI, Register_Position(offset++, 0, 6, sizeof(duint) * 2)); | ||||||
|     mRegisterMapping.insert(CDI, "EDI"); |     mRegisterMapping.insert(CDI, "EDI"); | ||||||
|     mRegisterPlaces.insert(CDI, Register_Position(offset++, 0, 6, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(CDI, Register_Position(offset++, 0, 6, sizeof(duint) * 2)); | ||||||
| 
 | 
 | ||||||
|     offset++; |     offset++; | ||||||
| 
 | 
 | ||||||
|     mRegisterMapping.insert(CIP, "EIP"); |     mRegisterMapping.insert(CIP, "EIP"); | ||||||
|     mRegisterPlaces.insert(CIP, Register_Position(offset++, 0, 6, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(CIP, Register_Position(offset++, 0, 6, sizeof(duint) * 2)); | ||||||
| 
 | 
 | ||||||
|     offset++; |     offset++; | ||||||
| 
 | 
 | ||||||
|     mRegisterMapping.insert(EFLAGS, "EFLAGS"); |     mRegisterMapping.insert(EFLAGS, "EFLAGS"); | ||||||
|     mRegisterPlaces.insert(EFLAGS, Register_Position(offset++, 0, 9, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(EFLAGS, Register_Position(offset++, 0, 9, sizeof(duint) * 2)); | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|     mRegisterMapping.insert(ZF, "ZF"); |     mRegisterMapping.insert(ZF, "ZF"); | ||||||
|  | @ -389,17 +389,17 @@ void RegistersView::InitMappings() | ||||||
|     offset++; |     offset++; | ||||||
| 
 | 
 | ||||||
|     mRegisterMapping.insert(DR0, "DR0"); |     mRegisterMapping.insert(DR0, "DR0"); | ||||||
|     mRegisterPlaces.insert(DR0, Register_Position(offset++, 0, 4, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(DR0, Register_Position(offset++, 0, 4, sizeof(duint) * 2)); | ||||||
|     mRegisterMapping.insert(DR1, "DR1"); |     mRegisterMapping.insert(DR1, "DR1"); | ||||||
|     mRegisterPlaces.insert(DR1, Register_Position(offset++, 0, 4, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(DR1, Register_Position(offset++, 0, 4, sizeof(duint) * 2)); | ||||||
|     mRegisterMapping.insert(DR2, "DR2"); |     mRegisterMapping.insert(DR2, "DR2"); | ||||||
|     mRegisterPlaces.insert(DR2, Register_Position(offset++, 0, 4, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(DR2, Register_Position(offset++, 0, 4, sizeof(duint) * 2)); | ||||||
|     mRegisterMapping.insert(DR3, "DR3"); |     mRegisterMapping.insert(DR3, "DR3"); | ||||||
|     mRegisterPlaces.insert(DR3, Register_Position(offset++, 0, 4, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(DR3, Register_Position(offset++, 0, 4, sizeof(duint) * 2)); | ||||||
|     mRegisterMapping.insert(DR6, "DR6"); |     mRegisterMapping.insert(DR6, "DR6"); | ||||||
|     mRegisterPlaces.insert(DR6, Register_Position(offset++, 0, 4, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(DR6, Register_Position(offset++, 0, 4, sizeof(duint) * 2)); | ||||||
|     mRegisterMapping.insert(DR7, "DR7"); |     mRegisterMapping.insert(DR7, "DR7"); | ||||||
|     mRegisterPlaces.insert(DR7, Register_Position(offset++, 0, 4, sizeof(uint_t) * 2)); |     mRegisterPlaces.insert(DR7, Register_Position(offset++, 0, 4, sizeof(duint) * 2)); | ||||||
| 
 | 
 | ||||||
|     mRowsNeeded = offset + 1; |     mRowsNeeded = offset + 1; | ||||||
| } | } | ||||||
|  | @ -1305,8 +1305,8 @@ QString RegistersView::getRegisterLabel(REGISTER_NAME register_selected) | ||||||
|     char module_text[MAX_MODULE_SIZE] = ""; |     char module_text[MAX_MODULE_SIZE] = ""; | ||||||
|     char string_text[MAX_STRING_SIZE] = ""; |     char string_text[MAX_STRING_SIZE] = ""; | ||||||
| 
 | 
 | ||||||
|     QString valueText = QString("%1").arg((* ((uint_t*) registerValue(&wRegDumpStruct, register_selected))), mRegisterPlaces[register_selected].valuesize, 16, QChar('0')).toUpper(); |     QString valueText = QString("%1").arg((* ((duint*) registerValue(&wRegDumpStruct, register_selected))), mRegisterPlaces[register_selected].valuesize, 16, QChar('0')).toUpper(); | ||||||
|     duint register_value = (* ((uint_t*) registerValue(&wRegDumpStruct, register_selected))); |     duint register_value = (* ((duint*) registerValue(&wRegDumpStruct, register_selected))); | ||||||
|     QString newText = QString(""); |     QString newText = QString(""); | ||||||
| 
 | 
 | ||||||
|     bool hasString = DbgGetStringAt(register_value, string_text); |     bool hasString = DbgGetStringAt(register_value, string_text); | ||||||
|  | @ -1424,7 +1424,7 @@ QString RegistersView::GetRegStringValueFromValue(REGISTER_NAME reg, char* value | ||||||
|     QString valueText; |     QString valueText; | ||||||
| 
 | 
 | ||||||
|     if(mUINTDISPLAY.contains(reg)) |     if(mUINTDISPLAY.contains(reg)) | ||||||
|         valueText = QString("%1").arg((* ((uint_t*) value)), mRegisterPlaces[reg].valuesize, 16, QChar('0')).toUpper(); |         valueText = QString("%1").arg((* ((duint*) value)), mRegisterPlaces[reg].valuesize, 16, QChar('0')).toUpper(); | ||||||
|     else if(mUSHORTDISPLAY.contains(reg)) |     else if(mUSHORTDISPLAY.contains(reg)) | ||||||
|         valueText = QString("%1").arg((* ((unsigned short*) value)), mRegisterPlaces[reg].valuesize, 16, QChar('0')).toUpper(); |         valueText = QString("%1").arg((* ((unsigned short*) value)), mRegisterPlaces[reg].valuesize, 16, QChar('0')).toUpper(); | ||||||
|     else if(mDWORDDISPLAY.contains(reg)) |     else if(mDWORDDISPLAY.contains(reg)) | ||||||
|  | @ -1869,7 +1869,7 @@ void RegistersView::ModifyFields(QString title, STRING_VALUE_TABLE_t* table, SIZ | ||||||
| 
 | 
 | ||||||
|     QListWidgetItem* item = mQListWidget->takeItem(mQListWidget->currentRow()); |     QListWidgetItem* item = mQListWidget->takeItem(mQListWidget->currentRow()); | ||||||
| 
 | 
 | ||||||
|     uint_t value; |     duint value; | ||||||
| 
 | 
 | ||||||
|     for(i = 0; i < size; i++) |     for(i = 0; i < size; i++) | ||||||
|     { |     { | ||||||
|  | @ -1879,7 +1879,7 @@ void RegistersView::ModifyFields(QString title, STRING_VALUE_TABLE_t* table, SIZ | ||||||
| 
 | 
 | ||||||
|     value = table[i].value; |     value = table[i].value; | ||||||
| 
 | 
 | ||||||
|     setRegister(mSelected, (uint_t)value); |     setRegister(mSelected, (duint)value); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #define MODIFY_FIELDS_DISPLAY(title, table) ModifyFields(QString("Edit ") + QString(title), (STRING_VALUE_TABLE_t *) & table, SIZE_TABLE(table) ) | #define MODIFY_FIELDS_DISPLAY(title, table) ModifyFields(QString("Edit ") + QString(title), (STRING_VALUE_TABLE_t *) & table, SIZE_TABLE(table) ) | ||||||
|  | @ -1916,10 +1916,10 @@ void RegistersView::displayEditDialog() | ||||||
|                 else |                 else | ||||||
|                 { |                 { | ||||||
|                     bool ok = false; |                     bool ok = false; | ||||||
|                     uint_t fpuvalue; |                     duint fpuvalue; | ||||||
| 
 | 
 | ||||||
|                     if(mUSHORTDISPLAY.contains(mSelected)) |                     if(mUSHORTDISPLAY.contains(mSelected)) | ||||||
|                         fpuvalue = (uint_t) mLineEdit.editText.toUShort(&ok, 16); |                         fpuvalue = (duint) mLineEdit.editText.toUShort(&ok, 16); | ||||||
|                     else if(mDWORDDISPLAY.contains(mSelected)) |                     else if(mDWORDDISPLAY.contains(mSelected)) | ||||||
|                         fpuvalue = mLineEdit.editText.toUInt(&ok, 16); |                         fpuvalue = mLineEdit.editText.toUInt(&ok, 16); | ||||||
|                     else if(mFPUMMX.contains(mSelected) || mFPUXMM.contains(mSelected) || mFPUYMM.contains(mSelected) || mFPUx87_80BITSDISPLAY.contains(mSelected)) |                     else if(mFPUMMX.contains(mSelected) || mFPUXMM.contains(mSelected) || mFPUYMM.contains(mSelected) || mFPUx87_80BITSDISPLAY.contains(mSelected)) | ||||||
|  | @ -1947,7 +1947,7 @@ void RegistersView::displayEditDialog() | ||||||
|                                 } |                                 } | ||||||
| 
 | 
 | ||||||
|                                 if(ok) |                                 if(ok) | ||||||
|                                     setRegister(mSelected, (uint_t) pData); |                                     setRegister(mSelected, (duint) pData); | ||||||
| 
 | 
 | ||||||
|                                 free(pData); |                                 free(pData); | ||||||
| 
 | 
 | ||||||
|  | @ -1977,7 +1977,7 @@ void RegistersView::displayEditDialog() | ||||||
|     else |     else | ||||||
|     { |     { | ||||||
|         WordEditDialog wEditDial(this); |         WordEditDialog wEditDial(this); | ||||||
|         wEditDial.setup(QString("Edit"), (* ((uint_t*) registerValue(&wRegDumpStruct, mSelected))), sizeof(int_t)); |         wEditDial.setup(QString("Edit"), (* ((duint*) registerValue(&wRegDumpStruct, mSelected))), sizeof(dsint)); | ||||||
|         if(wEditDial.exec() == QDialog::Accepted) //OK button clicked
 |         if(wEditDial.exec() == QDialog::Accepted) //OK button clicked
 | ||||||
|             setRegister(mSelected, wEditDial.getVal()); |             setRegister(mSelected, wEditDial.getVal()); | ||||||
|     } |     } | ||||||
|  | @ -1986,25 +1986,25 @@ void RegistersView::displayEditDialog() | ||||||
| void RegistersView::onIncrementx87StackAction() | void RegistersView::onIncrementx87StackAction() | ||||||
| { | { | ||||||
|     if(mFPUx87_80BITSDISPLAY.contains(mSelected)) |     if(mFPUx87_80BITSDISPLAY.contains(mSelected)) | ||||||
|         setRegister(x87SW_TOP, ((* ((uint_t*) registerValue(&wRegDumpStruct, x87SW_TOP))) + 1) % 8); |         setRegister(x87SW_TOP, ((* ((duint*) registerValue(&wRegDumpStruct, x87SW_TOP))) + 1) % 8); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void RegistersView::onDecrementx87StackAction() | void RegistersView::onDecrementx87StackAction() | ||||||
| { | { | ||||||
|     if(mFPUx87_80BITSDISPLAY.contains(mSelected)) |     if(mFPUx87_80BITSDISPLAY.contains(mSelected)) | ||||||
|         setRegister(x87SW_TOP, ((* ((uint_t*) registerValue(&wRegDumpStruct, x87SW_TOP))) - 1) % 8); |         setRegister(x87SW_TOP, ((* ((duint*) registerValue(&wRegDumpStruct, x87SW_TOP))) - 1) % 8); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void RegistersView::onIncrementAction() | void RegistersView::onIncrementAction() | ||||||
| { | { | ||||||
|     if(mINCREMENTDECREMET.contains(mSelected)) |     if(mINCREMENTDECREMET.contains(mSelected)) | ||||||
|         setRegister(mSelected, (* ((uint_t*) registerValue(&wRegDumpStruct, mSelected))) + 1); |         setRegister(mSelected, (* ((duint*) registerValue(&wRegDumpStruct, mSelected))) + 1); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void RegistersView::onDecrementAction() | void RegistersView::onDecrementAction() | ||||||
| { | { | ||||||
|     if(mINCREMENTDECREMET.contains(mSelected)) |     if(mINCREMENTDECREMET.contains(mSelected)) | ||||||
|         setRegister(mSelected, (* ((uint_t*) registerValue(&wRegDumpStruct, mSelected))) - 1); |         setRegister(mSelected, (* ((duint*) registerValue(&wRegDumpStruct, mSelected))) - 1); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void RegistersView::onZeroAction() | void RegistersView::onZeroAction() | ||||||
|  | @ -2037,7 +2037,7 @@ void RegistersView::onToggleValueAction() | ||||||
|         else |         else | ||||||
|         { |         { | ||||||
|             bool ok = false; |             bool ok = false; | ||||||
|             int_t val = GetRegStringValueFromValue(mSelected, registerValue(&wRegDumpStruct, mSelected)).toInt(&ok, 16); |             dsint val = GetRegStringValueFromValue(mSelected, registerValue(&wRegDumpStruct, mSelected)).toInt(&ok, 16); | ||||||
|             if(ok) |             if(ok) | ||||||
|             { |             { | ||||||
|                 val++; |                 val++; | ||||||
|  | @ -2069,8 +2069,8 @@ void RegistersView::onFollowInDisassembly() | ||||||
| { | { | ||||||
|     if(mCANSTOREADDRESS.contains(mSelected)) |     if(mCANSTOREADDRESS.contains(mSelected)) | ||||||
|     { |     { | ||||||
|         QString addr = QString("%1").arg((* ((uint_t*) registerValue(&wRegDumpStruct, mSelected))), mRegisterPlaces[mSelected].valuesize, 16, QChar('0')).toUpper(); |         QString addr = QString("%1").arg((* ((duint*) registerValue(&wRegDumpStruct, mSelected))), mRegisterPlaces[mSelected].valuesize, 16, QChar('0')).toUpper(); | ||||||
|         if(DbgMemIsValidReadPtr((* ((uint_t*) registerValue(&wRegDumpStruct, mSelected))))) |         if(DbgMemIsValidReadPtr((* ((duint*) registerValue(&wRegDumpStruct, mSelected))))) | ||||||
|             DbgCmdExec(QString().sprintf("disasm \"%s\"", addr.toUtf8().constData()).toUtf8().constData()); |             DbgCmdExec(QString().sprintf("disasm \"%s\"", addr.toUtf8().constData()).toUtf8().constData()); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | @ -2079,8 +2079,8 @@ void RegistersView::onFollowInDump() | ||||||
| { | { | ||||||
|     if(mCANSTOREADDRESS.contains(mSelected)) |     if(mCANSTOREADDRESS.contains(mSelected)) | ||||||
|     { |     { | ||||||
|         QString addr = QString("%1").arg((* ((uint_t*) registerValue(&wRegDumpStruct, mSelected))), mRegisterPlaces[mSelected].valuesize, 16, QChar('0')).toUpper(); |         QString addr = QString("%1").arg((* ((duint*) registerValue(&wRegDumpStruct, mSelected))), mRegisterPlaces[mSelected].valuesize, 16, QChar('0')).toUpper(); | ||||||
|         if(DbgMemIsValidReadPtr((* ((uint_t*) registerValue(&wRegDumpStruct, mSelected))))) |         if(DbgMemIsValidReadPtr((* ((duint*) registerValue(&wRegDumpStruct, mSelected))))) | ||||||
|             DbgCmdExec(QString().sprintf("dump \"%s\"", addr.toUtf8().constData()).toUtf8().constData()); |             DbgCmdExec(QString().sprintf("dump \"%s\"", addr.toUtf8().constData()).toUtf8().constData()); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | @ -2089,8 +2089,8 @@ void RegistersView::onFollowInStack() | ||||||
| { | { | ||||||
|     if(mCANSTOREADDRESS.contains(mSelected)) |     if(mCANSTOREADDRESS.contains(mSelected)) | ||||||
|     { |     { | ||||||
|         QString addr = QString("%1").arg((* ((uint_t*) registerValue(&wRegDumpStruct, mSelected))), mRegisterPlaces[mSelected].valuesize, 16, QChar('0')).toUpper(); |         QString addr = QString("%1").arg((* ((duint*) registerValue(&wRegDumpStruct, mSelected))), mRegisterPlaces[mSelected].valuesize, 16, QChar('0')).toUpper(); | ||||||
|         if(DbgMemIsValidReadPtr((* ((uint_t*) registerValue(&wRegDumpStruct, mSelected))))) |         if(DbgMemIsValidReadPtr((* ((duint*) registerValue(&wRegDumpStruct, mSelected))))) | ||||||
|             DbgCmdExec(QString().sprintf("sdump \"%s\"", addr.toUtf8().constData()).toUtf8().constData()); |             DbgCmdExec(QString().sprintf("sdump \"%s\"", addr.toUtf8().constData()).toUtf8().constData()); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | @ -2113,9 +2113,9 @@ void RegistersView::displayCustomContextMenuSlot(QPoint pos) | ||||||
|     { |     { | ||||||
|         if(mSETONEZEROTOGGLE.contains(mSelected)) |         if(mSETONEZEROTOGGLE.contains(mSelected)) | ||||||
|         { |         { | ||||||
|             if((* ((uint_t*) registerValue(&wRegDumpStruct, mSelected))) >= 1) |             if((* ((duint*) registerValue(&wRegDumpStruct, mSelected))) >= 1) | ||||||
|                 wMenu.addAction(wCM_Zero); |                 wMenu.addAction(wCM_Zero); | ||||||
|             if((* ((uint_t*) registerValue(&wRegDumpStruct, mSelected))) == 0) |             if((* ((duint*) registerValue(&wRegDumpStruct, mSelected))) == 0) | ||||||
|                 wMenu.addAction(wCM_SetToOne); |                 wMenu.addAction(wCM_SetToOne); | ||||||
|             wMenu.addAction(wCM_ToggleValue); |             wMenu.addAction(wCM_ToggleValue); | ||||||
|         } |         } | ||||||
|  | @ -2139,7 +2139,7 @@ void RegistersView::displayCustomContextMenuSlot(QPoint pos) | ||||||
| 
 | 
 | ||||||
|         if(mCANSTOREADDRESS.contains(mSelected)) |         if(mCANSTOREADDRESS.contains(mSelected)) | ||||||
|         { |         { | ||||||
|             uint_t addr = (* ((uint_t*) registerValue(&wRegDumpStruct, mSelected))); |             duint addr = (* ((duint*) registerValue(&wRegDumpStruct, mSelected))); | ||||||
|             if(DbgMemIsValidReadPtr(addr)) |             if(DbgMemIsValidReadPtr(addr)) | ||||||
|             { |             { | ||||||
|                 wMenu.addAction(wCM_FollowInDump); |                 wMenu.addAction(wCM_FollowInDump); | ||||||
|  | @ -2179,7 +2179,7 @@ void RegistersView::displayCustomContextMenuSlot(QPoint pos) | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void RegistersView::setRegister(REGISTER_NAME reg, uint_t value) | void RegistersView::setRegister(REGISTER_NAME reg, duint value) | ||||||
| { | { | ||||||
|     // is register-id known?
 |     // is register-id known?
 | ||||||
|     if(mRegisterMapping.contains(reg)) |     if(mRegisterMapping.contains(reg)) | ||||||
|  | @ -2223,7 +2223,7 @@ SIZE_T RegistersView::GetSizeRegister(const REGISTER_NAME reg_name) | ||||||
|     SIZE_T size; |     SIZE_T size; | ||||||
| 
 | 
 | ||||||
|     if(mUINTDISPLAY.contains(reg_name)) |     if(mUINTDISPLAY.contains(reg_name)) | ||||||
|         size = sizeof(uint_t); |         size = sizeof(duint); | ||||||
|     else if(mUSHORTDISPLAY.contains(reg_name) || mFIELDVALUE.contains(reg_name)) |     else if(mUSHORTDISPLAY.contains(reg_name) || mFIELDVALUE.contains(reg_name)) | ||||||
|         size = sizeof(unsigned short); |         size = sizeof(unsigned short); | ||||||
|     else if(mDWORDDISPLAY.contains(reg_name)) |     else if(mDWORDDISPLAY.contains(reg_name)) | ||||||
|  |  | ||||||
|  | @ -101,7 +101,7 @@ public slots: | ||||||
|     void refreshShortcutsSlot(); |     void refreshShortcutsSlot(); | ||||||
|     void updateRegistersSlot(); |     void updateRegistersSlot(); | ||||||
|     void displayCustomContextMenuSlot(QPoint pos); |     void displayCustomContextMenuSlot(QPoint pos); | ||||||
|     void setRegister(REGISTER_NAME reg, uint_t value); |     void setRegister(REGISTER_NAME reg, duint value); | ||||||
|     void debugStateChangedSlot(DBGSTATE state); |     void debugStateChangedSlot(DBGSTATE state); | ||||||
|     void repaint(); |     void repaint(); | ||||||
|     void ShowFPU(bool set_showfpu); |     void ShowFPU(bool set_showfpu); | ||||||
|  | @ -217,7 +217,7 @@ private: | ||||||
|     QAction* wCM_Incrementx87Stack; |     QAction* wCM_Incrementx87Stack; | ||||||
|     QAction* wCM_Decrementx87Stack; |     QAction* wCM_Decrementx87Stack; | ||||||
|     QAction* wCM_ChangeFPUView; |     QAction* wCM_ChangeFPUView; | ||||||
|     int_t mCip; |     dsint mCip; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| #endif // REGISTERSVIEW_H
 | #endif // REGISTERSVIEW_H
 | ||||||
|  |  | ||||||
|  | @ -44,7 +44,7 @@ void ScriptView::colorsUpdated() | ||||||
|     backgroundColor = ConfigColor("DisassemblyBackgroundColor"); |     backgroundColor = ConfigColor("DisassemblyBackgroundColor"); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| QString ScriptView::paintContent(QPainter* painter, int_t rowBase, int rowOffset, int col, int x, int y, int w, int h) | QString ScriptView::paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h) | ||||||
| { | { | ||||||
|     bool wIsSelected = isSelected(rowBase, rowOffset); |     bool wIsSelected = isSelected(rowBase, rowOffset); | ||||||
|     // Highlight if selected
 |     // Highlight if selected
 | ||||||
|  | @ -312,8 +312,8 @@ void ScriptView::keyPressEvent(QKeyEvent* event) | ||||||
|     int key = event->key(); |     int key = event->key(); | ||||||
|     if(key == Qt::Key_Up || key == Qt::Key_Down) |     if(key == Qt::Key_Up || key == Qt::Key_Down) | ||||||
|     { |     { | ||||||
|         int_t botRVA = getTableOffset(); |         dsint botRVA = getTableOffset(); | ||||||
|         int_t topRVA = botRVA + getNbrOfLineToPrint() - 1; |         dsint topRVA = botRVA + getNbrOfLineToPrint() - 1; | ||||||
|         if(key == Qt::Key_Up) |         if(key == Qt::Key_Up) | ||||||
|             selectPrevious(); |             selectPrevious(); | ||||||
|         else |         else | ||||||
|  |  | ||||||
|  | @ -11,7 +11,7 @@ public: | ||||||
|     void colorsUpdated(); |     void colorsUpdated(); | ||||||
| 
 | 
 | ||||||
|     // Reimplemented Functions
 |     // Reimplemented Functions
 | ||||||
|     QString paintContent(QPainter* painter, int_t rowBase, int rowOffset, int col, int x, int y, int w, int h); |     QString paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h); | ||||||
|     void mouseDoubleClickEvent(QMouseEvent* event); |     void mouseDoubleClickEvent(QMouseEvent* event); | ||||||
|     void keyPressEvent(QKeyEvent* event); |     void keyPressEvent(QKeyEvent* event); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -23,7 +23,7 @@ void SourceView::contextMenuSlot(const QPoint & pos) | ||||||
|     QMenu* wMenu = new QMenu(this); |     QMenu* wMenu = new QMenu(this); | ||||||
| 
 | 
 | ||||||
|     int line = getInitialSelection() + 1; |     int line = getInitialSelection() + 1; | ||||||
|     int_t addr = DbgFunctions()->GetAddrFromLine(mSourcePath.toUtf8().constData(), line); |     dsint addr = DbgFunctions()->GetAddrFromLine(mSourcePath.toUtf8().constData(), line); | ||||||
|     if(addr) |     if(addr) | ||||||
|         wMenu->addAction(mFollowInDisasm); |         wMenu->addAction(mFollowInDisasm); | ||||||
| 
 | 
 | ||||||
|  | @ -97,7 +97,7 @@ void SourceView::loadFile() | ||||||
|     file.close(); |     file.close(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| QString SourceView::paintContent(QPainter* painter, int_t rowBase, int rowOffset, int col, int x, int y, int w, int h) | QString SourceView::paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h) | ||||||
| { | { | ||||||
|     painter->save(); |     painter->save(); | ||||||
|     bool wIsSelected = isSelected(rowBase, rowOffset); |     bool wIsSelected = isSelected(rowBase, rowOffset); | ||||||
|  | @ -134,7 +134,7 @@ QString SourceView::paintContent(QPainter* painter, int_t rowBase, int rowOffset | ||||||
| void SourceView::followInDisasmSlot() | void SourceView::followInDisasmSlot() | ||||||
| { | { | ||||||
|     int line = getInitialSelection() + 1; |     int line = getInitialSelection() + 1; | ||||||
|     int_t addr = DbgFunctions()->GetAddrFromLine(mSourcePath.toUtf8().constData(), line); |     dsint addr = DbgFunctions()->GetAddrFromLine(mSourcePath.toUtf8().constData(), line); | ||||||
|     DbgCmdExecDirect(QString().sprintf("disasm %p", addr).toUtf8().constData()); |     DbgCmdExecDirect(QString().sprintf("disasm %p", addr).toUtf8().constData()); | ||||||
|     emit showCpu(); |     emit showCpu(); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -13,7 +13,7 @@ public: | ||||||
|     explicit SourceView(QString path, int line = 0, StdTable* parent = 0); |     explicit SourceView(QString path, int line = 0, StdTable* parent = 0); | ||||||
|     QString getSourcePath(); |     QString getSourcePath(); | ||||||
|     void setInstructionPointer(int line); |     void setInstructionPointer(int line); | ||||||
|     QString paintContent(QPainter* painter, int_t rowBase, int rowOffset, int col, int x, int y, int w, int h); |     QString paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h); | ||||||
|     void setupContextMenu(); |     void setupContextMenu(); | ||||||
|     void setSelection(int line); |     void setSelection(int line); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -23,16 +23,16 @@ SymbolView::SymbolView(QWidget* parent) : QWidget(parent), ui(new Ui::SymbolView | ||||||
|     // Create module list
 |     // Create module list
 | ||||||
|     mModuleList = new StdTable(); |     mModuleList = new StdTable(); | ||||||
|     int charwidth = mModuleList->getCharWidth(); |     int charwidth = mModuleList->getCharWidth(); | ||||||
|     mModuleList->addColumnAt(charwidth * 2 * sizeof(int_t) + 8, "Base", false); |     mModuleList->addColumnAt(charwidth * 2 * sizeof(dsint) + 8, "Base", false); | ||||||
|     mModuleList->addColumnAt(500, "Module", true); |     mModuleList->addColumnAt(500, "Module", true); | ||||||
| 
 | 
 | ||||||
|     // Setup symbol list
 |     // Setup symbol list
 | ||||||
|     mSearchListView->mList->addColumnAt(charwidth * 2 * sizeof(int_t) + 8, "Address", true); |     mSearchListView->mList->addColumnAt(charwidth * 2 * sizeof(dsint) + 8, "Address", true); | ||||||
|     mSearchListView->mList->addColumnAt(charwidth * 80, "Symbol", true); |     mSearchListView->mList->addColumnAt(charwidth * 80, "Symbol", true); | ||||||
|     mSearchListView->mList->addColumnAt(2000, "Symbol (undecorated)", true); |     mSearchListView->mList->addColumnAt(2000, "Symbol (undecorated)", true); | ||||||
| 
 | 
 | ||||||
|     // Setup search list
 |     // Setup search list
 | ||||||
|     mSearchListView->mSearchList->addColumnAt(charwidth * 2 * sizeof(int_t) + 8, "Address", true); |     mSearchListView->mSearchList->addColumnAt(charwidth * 2 * sizeof(dsint) + 8, "Address", true); | ||||||
|     mSearchListView->mSearchList->addColumnAt(charwidth * 80, "Symbol", true); |     mSearchListView->mSearchList->addColumnAt(charwidth * 80, "Symbol", true); | ||||||
|     mSearchListView->mSearchList->addColumnAt(2000, "Symbol (undecorated)", true); |     mSearchListView->mSearchList->addColumnAt(2000, "Symbol (undecorated)", true); | ||||||
| 
 | 
 | ||||||
|  | @ -161,9 +161,9 @@ void SymbolView::clearSymbolLogSlot() | ||||||
| void SymbolView::cbSymbolEnum(SYMBOLINFO* symbol, void* user) | void SymbolView::cbSymbolEnum(SYMBOLINFO* symbol, void* user) | ||||||
| { | { | ||||||
|     StdTable* symbolList = (StdTable*)user; |     StdTable* symbolList = (StdTable*)user; | ||||||
|     int_t index = symbolList->getRowCount(); |     dsint index = symbolList->getRowCount(); | ||||||
|     symbolList->setRowCount(index + 1); |     symbolList->setRowCount(index + 1); | ||||||
|     symbolList->setCellContent(index, 0, QString("%1").arg(symbol->addr, sizeof(int_t) * 2, 16, QChar('0')).toUpper()); |     symbolList->setCellContent(index, 0, QString("%1").arg(symbol->addr, sizeof(dsint) * 2, 16, QChar('0')).toUpper()); | ||||||
|     if(symbol->decoratedSymbol) |     if(symbol->decoratedSymbol) | ||||||
|     { |     { | ||||||
|         symbolList->setCellContent(index, 1, symbol->decoratedSymbol); |         symbolList->setCellContent(index, 1, symbol->decoratedSymbol); | ||||||
|  | @ -203,7 +203,7 @@ void SymbolView::updateSymbolList(int module_count, SYMBOLMODULEINFO* modules) | ||||||
|     for(int i = 0; i < module_count; i++) |     for(int i = 0; i < module_count; i++) | ||||||
|     { |     { | ||||||
|         mModuleBaseList.insert(modules[i].name, modules[i].base); |         mModuleBaseList.insert(modules[i].name, modules[i].base); | ||||||
|         mModuleList->setCellContent(i, 0, QString("%1").arg(modules[i].base, sizeof(int_t) * 2, 16, QChar('0')).toUpper()); |         mModuleList->setCellContent(i, 0, QString("%1").arg(modules[i].base, sizeof(dsint) * 2, 16, QChar('0')).toUpper()); | ||||||
|         mModuleList->setCellContent(i, 1, modules[i].name); |         mModuleList->setCellContent(i, 1, modules[i].name); | ||||||
|     } |     } | ||||||
|     mModuleList->reloadData(); |     mModuleList->reloadData(); | ||||||
|  | @ -248,7 +248,7 @@ void SymbolView::moduleContextMenu(const QPoint & pos) | ||||||
|     wMenu->addAction(mFollowModuleEntryAction); |     wMenu->addAction(mFollowModuleEntryAction); | ||||||
|     wMenu->addAction(mDownloadSymbolsAction); |     wMenu->addAction(mDownloadSymbolsAction); | ||||||
|     wMenu->addAction(mDownloadAllSymbolsAction); |     wMenu->addAction(mDownloadAllSymbolsAction); | ||||||
|     int_t modbase = DbgValFromString(mModuleList->getCellContent(mModuleList->getInitialSelection(), 0).toUtf8().constData()); |     dsint modbase = DbgValFromString(mModuleList->getCellContent(mModuleList->getInitialSelection(), 0).toUtf8().constData()); | ||||||
|     char szModPath[MAX_PATH] = ""; |     char szModPath[MAX_PATH] = ""; | ||||||
|     if(DbgFunctions()->ModPathFromAddr(modbase, szModPath, _countof(szModPath))) |     if(DbgFunctions()->ModPathFromAddr(modbase, szModPath, _countof(szModPath))) | ||||||
|         wMenu->addAction(mCopyPathAction); |         wMenu->addAction(mCopyPathAction); | ||||||
|  | @ -278,7 +278,7 @@ void SymbolView::moduleEntryFollow() | ||||||
| 
 | 
 | ||||||
| void SymbolView::moduleCopyPath() | void SymbolView::moduleCopyPath() | ||||||
| { | { | ||||||
|     int_t modbase = DbgValFromString(mModuleList->getCellContent(mModuleList->getInitialSelection(), 0).toUtf8().constData()); |     dsint modbase = DbgValFromString(mModuleList->getCellContent(mModuleList->getInitialSelection(), 0).toUtf8().constData()); | ||||||
|     char szModPath[MAX_PATH] = ""; |     char szModPath[MAX_PATH] = ""; | ||||||
|     if(DbgFunctions()->ModPathFromAddr(modbase, szModPath, _countof(szModPath))) |     if(DbgFunctions()->ModPathFromAddr(modbase, szModPath, _countof(szModPath))) | ||||||
|         Bridge::CopyToClipboard(szModPath); |         Bridge::CopyToClipboard(szModPath); | ||||||
|  | @ -325,11 +325,11 @@ void SymbolView::toggleBreakpoint() | ||||||
| 
 | 
 | ||||||
|     if((wBpType & bp_normal) == bp_normal) |     if((wBpType & bp_normal) == bp_normal) | ||||||
|     { |     { | ||||||
|         wCmd = "bc " + QString("%1").arg(wVA, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         wCmd = "bc " + QString("%1").arg(wVA, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     } |     } | ||||||
|     else |     else | ||||||
|     { |     { | ||||||
|         wCmd = "bp " + QString("%1").arg(wVA, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         wCmd = "bp " + QString("%1").arg(wVA, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     DbgCmdExec(wCmd.toUtf8().constData()); |     DbgCmdExec(wCmd.toUtf8().constData()); | ||||||
|  | @ -367,7 +367,7 @@ void SymbolView::toggleBookmark() | ||||||
| 
 | 
 | ||||||
| void SymbolView::moduleEntropy() | void SymbolView::moduleEntropy() | ||||||
| { | { | ||||||
|     int_t modbase = DbgValFromString(mModuleList->getCellContent(mModuleList->getInitialSelection(), 0).toUtf8().constData()); |     dsint modbase = DbgValFromString(mModuleList->getCellContent(mModuleList->getInitialSelection(), 0).toUtf8().constData()); | ||||||
|     char szModPath[MAX_PATH] = ""; |     char szModPath[MAX_PATH] = ""; | ||||||
|     if(DbgFunctions()->ModPathFromAddr(modbase, szModPath, _countof(szModPath))) |     if(DbgFunctions()->ModPathFromAddr(modbase, szModPath, _countof(szModPath))) | ||||||
|     { |     { | ||||||
|  |  | ||||||
|  | @ -51,7 +51,7 @@ private: | ||||||
|     QWidget* mSymbolPlaceHolder; |     QWidget* mSymbolPlaceHolder; | ||||||
|     SearchListView* mSearchListView; |     SearchListView* mSearchListView; | ||||||
|     StdTable* mModuleList; |     StdTable* mModuleList; | ||||||
|     QMap<QString, uint_t> mModuleBaseList; |     QMap<QString, duint> mModuleBaseList; | ||||||
|     QAction* mFollowSymbolAction; |     QAction* mFollowSymbolAction; | ||||||
|     QAction* mFollowSymbolDumpAction; |     QAction* mFollowSymbolDumpAction; | ||||||
|     QAction* mToggleBreakpoint; |     QAction* mToggleBreakpoint; | ||||||
|  |  | ||||||
|  | @ -189,12 +189,12 @@ ThreadView::ThreadView(StdTable* parent) : StdTable(parent) | ||||||
|     int charwidth = getCharWidth(); |     int charwidth = getCharWidth(); | ||||||
|     addColumnAt(8 + charwidth * sizeof(unsigned int) * 2, "Number", false); |     addColumnAt(8 + charwidth * sizeof(unsigned int) * 2, "Number", false); | ||||||
|     addColumnAt(8 + charwidth * sizeof(unsigned int) * 2, "ID", false); |     addColumnAt(8 + charwidth * sizeof(unsigned int) * 2, "ID", false); | ||||||
|     addColumnAt(8 + charwidth * sizeof(uint_t) * 2, "Entry", false); |     addColumnAt(8 + charwidth * sizeof(duint) * 2, "Entry", false); | ||||||
|     addColumnAt(8 + charwidth * sizeof(uint_t) * 2, "TEB", false); |     addColumnAt(8 + charwidth * sizeof(duint) * 2, "TEB", false); | ||||||
| #ifdef _WIN64 | #ifdef _WIN64 | ||||||
|     addColumnAt(8 + charwidth * sizeof(uint_t) * 2, "RIP", false); |     addColumnAt(8 + charwidth * sizeof(duint) * 2, "RIP", false); | ||||||
| #else | #else | ||||||
|     addColumnAt(8 + charwidth * sizeof(uint_t) * 2, "EIP", false); |     addColumnAt(8 + charwidth * sizeof(duint) * 2, "EIP", false); | ||||||
| #endif //_WIN64
 | #endif //_WIN64
 | ||||||
|     addColumnAt(8 + charwidth * 14, "Suspend Count", false); |     addColumnAt(8 + charwidth * 14, "Suspend Count", false); | ||||||
|     addColumnAt(8 + charwidth * 12, "Priority", false); |     addColumnAt(8 + charwidth * 12, "Priority", false); | ||||||
|  | @ -224,9 +224,9 @@ void ThreadView::updateThreadList() | ||||||
|         else |         else | ||||||
|             setCellContent(i, 0, QString("%1").arg(threadList.list[i].BasicInfo.ThreadNumber, 0, 10)); |             setCellContent(i, 0, QString("%1").arg(threadList.list[i].BasicInfo.ThreadNumber, 0, 10)); | ||||||
|         setCellContent(i, 1, QString("%1").arg(threadList.list[i].BasicInfo.ThreadId, 0, 16).toUpper()); |         setCellContent(i, 1, QString("%1").arg(threadList.list[i].BasicInfo.ThreadId, 0, 16).toUpper()); | ||||||
|         setCellContent(i, 2, QString("%1").arg(threadList.list[i].BasicInfo.ThreadStartAddress, sizeof(int_t) * 2, 16, QChar('0')).toUpper()); |         setCellContent(i, 2, QString("%1").arg(threadList.list[i].BasicInfo.ThreadStartAddress, sizeof(dsint) * 2, 16, QChar('0')).toUpper()); | ||||||
|         setCellContent(i, 3, QString("%1").arg(threadList.list[i].BasicInfo.ThreadLocalBase, sizeof(int_t) * 2, 16, QChar('0')).toUpper()); |         setCellContent(i, 3, QString("%1").arg(threadList.list[i].BasicInfo.ThreadLocalBase, sizeof(dsint) * 2, 16, QChar('0')).toUpper()); | ||||||
|         setCellContent(i, 4, QString("%1").arg(threadList.list[i].ThreadCip, sizeof(int_t) * 2, 16, QChar('0')).toUpper()); |         setCellContent(i, 4, QString("%1").arg(threadList.list[i].ThreadCip, sizeof(dsint) * 2, 16, QChar('0')).toUpper()); | ||||||
|         setCellContent(i, 5, QString().sprintf("%d", threadList.list[i].SuspendCount)); |         setCellContent(i, 5, QString().sprintf("%d", threadList.list[i].SuspendCount)); | ||||||
|         QString priorityString; |         QString priorityString; | ||||||
|         switch(threadList.list[i].Priority) |         switch(threadList.list[i].Priority) | ||||||
|  | @ -385,7 +385,7 @@ void ThreadView::updateThreadList() | ||||||
|     reloadData(); |     reloadData(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| QString ThreadView::paintContent(QPainter* painter, int_t rowBase, int rowOffset, int col, int x, int y, int w, int h) | QString ThreadView::paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h) | ||||||
| { | { | ||||||
|     QString ret = StdTable::paintContent(painter, rowBase, rowOffset, col, x, y, w, h); |     QString ret = StdTable::paintContent(painter, rowBase, rowOffset, col, x, y, w, h); | ||||||
|     if(rowBase + rowOffset == mCurrentThread && !col) |     if(rowBase + rowOffset == mCurrentThread && !col) | ||||||
|  |  | ||||||
|  | @ -9,7 +9,7 @@ class ThreadView : public StdTable | ||||||
|     Q_OBJECT |     Q_OBJECT | ||||||
| public: | public: | ||||||
|     explicit ThreadView(StdTable* parent = 0); |     explicit ThreadView(StdTable* parent = 0); | ||||||
|     QString paintContent(QPainter* painter, int_t rowBase, int rowOffset, int col, int x, int y, int w, int h); |     QString paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h); | ||||||
|     void setupContextMenu(); |     void setupContextMenu(); | ||||||
| 
 | 
 | ||||||
| public slots: | public slots: | ||||||
|  |  | ||||||
|  | @ -10,7 +10,7 @@ WordEditDialog::WordEditDialog(QWidget* parent) : QDialog(parent), ui(new Ui::Wo | ||||||
|     setModal(true); |     setModal(true); | ||||||
| 
 | 
 | ||||||
|     mValidateThread = new ValidateExpressionThread(this); |     mValidateThread = new ValidateExpressionThread(this); | ||||||
|     connect(mValidateThread, SIGNAL(expressionChanged(bool, bool, int_t)), this, SLOT(expressionChanged(bool, bool, int_t))); |     connect(mValidateThread, SIGNAL(expressionChanged(bool, bool, dsint)), this, SLOT(expressionChanged(bool, bool, dsint))); | ||||||
|     connect(ui->expressionLineEdit, SIGNAL(textEdited(QString)), mValidateThread, SLOT(textChanged(QString))); |     connect(ui->expressionLineEdit, SIGNAL(textEdited(QString)), mValidateThread, SLOT(textChanged(QString))); | ||||||
|     mWord = 0; |     mWord = 0; | ||||||
| } | } | ||||||
|  | @ -33,7 +33,7 @@ void WordEditDialog::hideEvent(QHideEvent* event) | ||||||
|     mValidateThread->wait(); |     mValidateThread->wait(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void WordEditDialog::setup(QString title, uint_t defVal, int byteCount) | void WordEditDialog::setup(QString title, duint defVal, int byteCount) | ||||||
| { | { | ||||||
|     this->setWindowTitle(title); |     this->setWindowTitle(title); | ||||||
|     ui->hexLineEdit->setInputMask(QString("hh").repeated(byteCount)); |     ui->hexLineEdit->setInputMask(QString("hh").repeated(byteCount)); | ||||||
|  | @ -43,12 +43,12 @@ void WordEditDialog::setup(QString title, uint_t defVal, int byteCount) | ||||||
|     ui->expressionLineEdit->setFocus(); |     ui->expressionLineEdit->setFocus(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| uint_t WordEditDialog::getVal() | duint WordEditDialog::getVal() | ||||||
| { | { | ||||||
|     return mWord; |     return mWord; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void WordEditDialog::expressionChanged(bool validExpression, bool validPointer, int_t value) | void WordEditDialog::expressionChanged(bool validExpression, bool validPointer, dsint value) | ||||||
| { | { | ||||||
|     Q_UNUSED(validPointer); |     Q_UNUSED(validPointer); | ||||||
|     if(validExpression) |     if(validExpression) | ||||||
|  | @ -60,7 +60,7 @@ void WordEditDialog::expressionChanged(bool validExpression, bool validPointer, | ||||||
| 
 | 
 | ||||||
|         //hex
 |         //hex
 | ||||||
|         mWord = value; |         mWord = value; | ||||||
|         uint_t hexWord = 0; |         duint hexWord = 0; | ||||||
|         unsigned char* hex = (unsigned char*)&hexWord; |         unsigned char* hex = (unsigned char*)&hexWord; | ||||||
|         unsigned char* word = (unsigned char*)&mWord; |         unsigned char* word = (unsigned char*)&mWord; | ||||||
| #ifdef _WIN64 | #ifdef _WIN64 | ||||||
|  | @ -78,11 +78,11 @@ void WordEditDialog::expressionChanged(bool validExpression, bool validPointer, | ||||||
|         hex[2] = word[1]; |         hex[2] = word[1]; | ||||||
|         hex[3] = word[0]; |         hex[3] = word[0]; | ||||||
| #endif //_WIN64
 | #endif //_WIN64
 | ||||||
|         ui->hexLineEdit->setText(QString("%1").arg(hexWord, sizeof(uint_t) * 2, 16, QChar('0')).toUpper()); |         ui->hexLineEdit->setText(QString("%1").arg(hexWord, sizeof(duint) * 2, 16, QChar('0')).toUpper()); | ||||||
|         //signed
 |         //signed
 | ||||||
|         ui->signedLineEdit->setText(QString::number((int_t)mWord)); |         ui->signedLineEdit->setText(QString::number((dsint)mWord)); | ||||||
|         //unsigned
 |         //unsigned
 | ||||||
|         ui->unsignedLineEdit->setText(QString::number((uint_t)mWord)); |         ui->unsignedLineEdit->setText(QString::number((duint)mWord)); | ||||||
|     } |     } | ||||||
|     else |     else | ||||||
|     { |     { | ||||||
|  | @ -104,7 +104,7 @@ void WordEditDialog::on_signedLineEdit_textEdited(const QString & arg1) | ||||||
|     { |     { | ||||||
|         ui->signedLineEdit->setStyleSheet(""); |         ui->signedLineEdit->setStyleSheet(""); | ||||||
|         ui->buttons->button(QDialogButtonBox::Ok)->setEnabled(true); |         ui->buttons->button(QDialogButtonBox::Ok)->setEnabled(true); | ||||||
|         ui->expressionLineEdit->setText(QString("%1").arg((uint_t)value, sizeof(uint_t) * 2, 16, QChar('0')).toUpper()); |         ui->expressionLineEdit->setText(QString("%1").arg((duint)value, sizeof(duint) * 2, 16, QChar('0')).toUpper()); | ||||||
|     } |     } | ||||||
|     else |     else | ||||||
|     { |     { | ||||||
|  | @ -120,7 +120,7 @@ void WordEditDialog::on_unsignedLineEdit_textEdited(const QString & arg1) | ||||||
|     { |     { | ||||||
|         ui->unsignedLineEdit->setStyleSheet(""); |         ui->unsignedLineEdit->setStyleSheet(""); | ||||||
|         ui->buttons->button(QDialogButtonBox::Ok)->setEnabled(true); |         ui->buttons->button(QDialogButtonBox::Ok)->setEnabled(true); | ||||||
|         ui->expressionLineEdit->setText(QString("%1").arg((uint_t)value, sizeof(uint_t) * 2, 16, QChar('0')).toUpper()); |         ui->expressionLineEdit->setText(QString("%1").arg((duint)value, sizeof(duint) * 2, 16, QChar('0')).toUpper()); | ||||||
|     } |     } | ||||||
|     else |     else | ||||||
|     { |     { | ||||||
|  |  | ||||||
|  | @ -18,20 +18,20 @@ class WordEditDialog : public QDialog | ||||||
| public: | public: | ||||||
|     explicit WordEditDialog(QWidget* parent = 0); |     explicit WordEditDialog(QWidget* parent = 0); | ||||||
|     ~WordEditDialog(); |     ~WordEditDialog(); | ||||||
|     void setup(QString title, uint_t defVal, int byteCount); |     void setup(QString title, duint defVal, int byteCount); | ||||||
|     uint_t getVal(); |     duint getVal(); | ||||||
|     void showEvent(QShowEvent* event); |     void showEvent(QShowEvent* event); | ||||||
|     void hideEvent(QHideEvent* event); |     void hideEvent(QHideEvent* event); | ||||||
| 
 | 
 | ||||||
| private slots: | private slots: | ||||||
|     void expressionChanged(bool validExpression, bool validPointer, int_t value); |     void expressionChanged(bool validExpression, bool validPointer, dsint value); | ||||||
|     void on_expressionLineEdit_textChanged(const QString & arg1); |     void on_expressionLineEdit_textChanged(const QString & arg1); | ||||||
|     void on_signedLineEdit_textEdited(const QString & arg1); |     void on_signedLineEdit_textEdited(const QString & arg1); | ||||||
|     void on_unsignedLineEdit_textEdited(const QString & arg1); |     void on_unsignedLineEdit_textEdited(const QString & arg1); | ||||||
| 
 | 
 | ||||||
| private: | private: | ||||||
|     Ui::WordEditDialog* ui; |     Ui::WordEditDialog* ui; | ||||||
|     uint_t mWord; |     duint mWord; | ||||||
|     ValidateExpressionThread* mValidateThread; |     ValidateExpressionThread* mValidateThread; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,49 +1,49 @@ | ||||||
| #include "MemoryPage.h" | #include "MemoryPage.h" | ||||||
| 
 | 
 | ||||||
| MemoryPage::MemoryPage(uint_t parBase, uint_t parSize, QObject* parent) : QObject(parent), mBase(0), mSize(0) | MemoryPage::MemoryPage(duint parBase, duint parSize, QObject* parent) : QObject(parent), mBase(0), mSize(0) | ||||||
| { | { | ||||||
|     Q_UNUSED(parBase); |     Q_UNUSED(parBase); | ||||||
|     Q_UNUSED(parSize); |     Q_UNUSED(parSize); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool MemoryPage::read(void* parDest, uint_t parRVA, uint_t parSize) const | bool MemoryPage::read(void* parDest, duint parRVA, duint parSize) const | ||||||
| { | { | ||||||
|     return DbgMemRead(mBase + parRVA, reinterpret_cast<unsigned char*>(parDest), parSize); |     return DbgMemRead(mBase + parRVA, reinterpret_cast<unsigned char*>(parDest), parSize); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool MemoryPage::read(byte_t* parDest, uint_t parRVA, uint_t parSize) const | bool MemoryPage::read(byte_t* parDest, duint parRVA, duint parSize) const | ||||||
| { | { | ||||||
|     return read(reinterpret_cast<void*>(parDest), parRVA, parSize); |     return read(reinterpret_cast<void*>(parDest), parRVA, parSize); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool MemoryPage::write(const void* parDest, uint_t parRVA, uint_t parSize) | bool MemoryPage::write(const void* parDest, duint parRVA, duint parSize) | ||||||
| { | { | ||||||
|     bool ret = DbgFunctions()->MemPatch(mBase + parRVA, reinterpret_cast<const unsigned char*>(parDest), parSize); |     bool ret = DbgFunctions()->MemPatch(mBase + parRVA, reinterpret_cast<const unsigned char*>(parDest), parSize); | ||||||
|     GuiUpdatePatches(); |     GuiUpdatePatches(); | ||||||
|     return ret; |     return ret; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool MemoryPage::write(const byte_t* parDest, uint_t parRVA, uint_t parSize) | bool MemoryPage::write(const byte_t* parDest, duint parRVA, duint parSize) | ||||||
| { | { | ||||||
|     return write(reinterpret_cast<const void*>(parDest), parRVA, parSize); |     return write(reinterpret_cast<const void*>(parDest), parRVA, parSize); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| uint_t MemoryPage::getSize() const | duint MemoryPage::getSize() const | ||||||
| { | { | ||||||
|     return mSize; |     return mSize; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| uint_t MemoryPage::getBase() const | duint MemoryPage::getBase() const | ||||||
| { | { | ||||||
|     return mBase; |     return mBase; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| uint_t MemoryPage::va(int_t rva) const | duint MemoryPage::va(dsint rva) const | ||||||
| { | { | ||||||
|     return mBase + rva; |     return mBase + rva; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void MemoryPage::setAttributes(uint_t base, uint_t size) | void MemoryPage::setAttributes(duint base, duint size) | ||||||
| { | { | ||||||
|     mBase = base; |     mBase = base; | ||||||
|     mSize = size; |     mSize = size; | ||||||
|  |  | ||||||
|  | @ -8,20 +8,20 @@ class MemoryPage : public QObject | ||||||
| { | { | ||||||
|     Q_OBJECT |     Q_OBJECT | ||||||
| public: | public: | ||||||
|     explicit MemoryPage(uint_t parBase, uint_t parSize, QObject* parent = 0); |     explicit MemoryPage(duint parBase, duint parSize, QObject* parent = 0); | ||||||
| 
 | 
 | ||||||
|     bool read(void* parDest, uint_t parRVA, uint_t parSize) const; |     bool read(void* parDest, duint parRVA, duint parSize) const; | ||||||
|     bool read(byte_t* parDest, uint_t parRVA, uint_t parSize) const; |     bool read(byte_t* parDest, duint parRVA, duint parSize) const; | ||||||
|     bool write(const void* parDest, uint_t parRVA, uint_t parSize); |     bool write(const void* parDest, duint parRVA, duint parSize); | ||||||
|     bool write(const byte_t* parDest, uint_t parRVA, uint_t parSize); |     bool write(const byte_t* parDest, duint parRVA, duint parSize); | ||||||
|     uint_t getSize() const; |     duint getSize() const; | ||||||
|     uint_t getBase() const; |     duint getBase() const; | ||||||
|     uint_t va(int_t rva) const; |     duint va(dsint rva) const; | ||||||
|     void setAttributes(uint_t base, uint_t size); |     void setAttributes(duint base, duint size); | ||||||
| 
 | 
 | ||||||
| private: | private: | ||||||
|     uint_t mBase; |     duint mBase; | ||||||
|     uint_t mSize; |     duint mSize; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| #endif // MEMORYPAGE_H
 | #endif // MEMORYPAGE_H
 | ||||||
|  |  | ||||||
|  | @ -9,7 +9,7 @@ class SnowmanView : public QWidget | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| extern "C" __declspec(dllexport) SnowmanView* CreateSnowman(QWidget* parent); | extern "C" __declspec(dllexport) SnowmanView* CreateSnowman(QWidget* parent); | ||||||
| extern "C" __declspec(dllexport) void DecompileAt(SnowmanView* snowman, int_t start, int_t end); | extern "C" __declspec(dllexport) void DecompileAt(SnowmanView* snowman, dsint start, dsint end); | ||||||
| extern "C" __declspec(dllexport) void CloseSnowman(SnowmanView* snowman); | extern "C" __declspec(dllexport) void CloseSnowman(SnowmanView* snowman); | ||||||
| 
 | 
 | ||||||
| #endif // SNOWMANVIEW_H
 | #endif // SNOWMANVIEW_H
 | ||||||
|  |  | ||||||
|  | @ -13,7 +13,7 @@ Breakpoints::Breakpoints(QObject* parent) : QObject(parent) | ||||||
|  * |  * | ||||||
|  * @return      Nothing. |  * @return      Nothing. | ||||||
|  */ |  */ | ||||||
| void Breakpoints::setBP(BPXTYPE type, uint_t va) | void Breakpoints::setBP(BPXTYPE type, duint va) | ||||||
| { | { | ||||||
|     QString wCmd = ""; |     QString wCmd = ""; | ||||||
| 
 | 
 | ||||||
|  | @ -21,19 +21,19 @@ void Breakpoints::setBP(BPXTYPE type, uint_t va) | ||||||
|     { |     { | ||||||
|     case bp_normal: |     case bp_normal: | ||||||
|     { |     { | ||||||
|         wCmd = "bp " + QString("%1").arg(va, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         wCmd = "bp " + QString("%1").arg(va, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     } |     } | ||||||
|     break; |     break; | ||||||
| 
 | 
 | ||||||
|     case bp_hardware: |     case bp_hardware: | ||||||
|     { |     { | ||||||
|         wCmd = "bph " + QString("%1").arg(va, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         wCmd = "bph " + QString("%1").arg(va, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     } |     } | ||||||
|     break; |     break; | ||||||
| 
 | 
 | ||||||
|     case bp_memory: |     case bp_memory: | ||||||
|     { |     { | ||||||
|         wCmd = "bpm " + QString("%1").arg(va, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         wCmd = "bpm " + QString("%1").arg(va, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     } |     } | ||||||
|     break; |     break; | ||||||
| 
 | 
 | ||||||
|  | @ -60,15 +60,15 @@ void Breakpoints::enableBP(const BRIDGEBP & bp) | ||||||
| 
 | 
 | ||||||
|     if(bp.type == bp_hardware) |     if(bp.type == bp_hardware) | ||||||
|     { |     { | ||||||
|         wCmd = "bphwe " + QString("%1").arg(bp.addr, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         wCmd = "bphwe " + QString("%1").arg(bp.addr, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     } |     } | ||||||
|     else if(bp.type == bp_normal) |     else if(bp.type == bp_normal) | ||||||
|     { |     { | ||||||
|         wCmd = "be " + QString("%1").arg(bp.addr, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         wCmd = "be " + QString("%1").arg(bp.addr, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     } |     } | ||||||
|     else if(bp.type == bp_memory) |     else if(bp.type == bp_memory) | ||||||
|     { |     { | ||||||
|         wCmd = "bpme " + QString("%1").arg(bp.addr, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         wCmd = "bpme " + QString("%1").arg(bp.addr, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     DbgCmdExec(wCmd.toUtf8().constData()); |     DbgCmdExec(wCmd.toUtf8().constData()); | ||||||
|  | @ -85,7 +85,7 @@ void Breakpoints::enableBP(const BRIDGEBP & bp) | ||||||
|  * |  * | ||||||
|  * @return      Nothing. |  * @return      Nothing. | ||||||
|  */ |  */ | ||||||
| void Breakpoints::enableBP(BPXTYPE type, uint_t va) | void Breakpoints::enableBP(BPXTYPE type, duint va) | ||||||
| { | { | ||||||
|     BPMAP wBPList; |     BPMAP wBPList; | ||||||
| 
 | 
 | ||||||
|  | @ -117,15 +117,15 @@ void Breakpoints::disableBP(const BRIDGEBP & bp) | ||||||
| 
 | 
 | ||||||
|     if(bp.type == bp_hardware) |     if(bp.type == bp_hardware) | ||||||
|     { |     { | ||||||
|         wCmd = "bphwd " + QString("%1").arg(bp.addr, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         wCmd = "bphwd " + QString("%1").arg(bp.addr, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     } |     } | ||||||
|     else if(bp.type == bp_normal) |     else if(bp.type == bp_normal) | ||||||
|     { |     { | ||||||
|         wCmd = "bd " + QString("%1").arg(bp.addr, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         wCmd = "bd " + QString("%1").arg(bp.addr, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     } |     } | ||||||
|     else if(bp.type == bp_memory) |     else if(bp.type == bp_memory) | ||||||
|     { |     { | ||||||
|         wCmd = "bpmd " + QString("%1").arg(bp.addr, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         wCmd = "bpmd " + QString("%1").arg(bp.addr, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     DbgCmdExec(wCmd.toUtf8().constData()); |     DbgCmdExec(wCmd.toUtf8().constData()); | ||||||
|  | @ -142,7 +142,7 @@ void Breakpoints::disableBP(const BRIDGEBP & bp) | ||||||
|  * |  * | ||||||
|  * @return      Nothing. |  * @return      Nothing. | ||||||
|  */ |  */ | ||||||
| void Breakpoints::disableBP(BPXTYPE type, uint_t va) | void Breakpoints::disableBP(BPXTYPE type, duint va) | ||||||
| { | { | ||||||
|     BPMAP wBPList; |     BPMAP wBPList; | ||||||
| 
 | 
 | ||||||
|  | @ -176,19 +176,19 @@ void Breakpoints::removeBP(const BRIDGEBP & bp) | ||||||
|     { |     { | ||||||
|     case bp_normal: |     case bp_normal: | ||||||
|     { |     { | ||||||
|         wCmd = "bc " + QString("%1").arg(bp.addr, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         wCmd = "bc " + QString("%1").arg(bp.addr, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     } |     } | ||||||
|     break; |     break; | ||||||
| 
 | 
 | ||||||
|     case bp_hardware: |     case bp_hardware: | ||||||
|     { |     { | ||||||
|         wCmd = "bphc " + QString("%1").arg(bp.addr, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         wCmd = "bphc " + QString("%1").arg(bp.addr, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     } |     } | ||||||
|     break; |     break; | ||||||
| 
 | 
 | ||||||
|     case bp_memory: |     case bp_memory: | ||||||
|     { |     { | ||||||
|         wCmd = "bpmc " + QString("%1").arg(bp.addr, sizeof(int_t) * 2, 16, QChar('0')).toUpper(); |         wCmd = "bpmc " + QString("%1").arg(bp.addr, sizeof(dsint) * 2, 16, QChar('0')).toUpper(); | ||||||
|     } |     } | ||||||
|     break; |     break; | ||||||
| 
 | 
 | ||||||
|  | @ -213,7 +213,7 @@ void Breakpoints::removeBP(const BRIDGEBP & bp) | ||||||
|  * |  * | ||||||
|  * @return      Nothing. |  * @return      Nothing. | ||||||
|  */ |  */ | ||||||
| void Breakpoints::removeBP(BPXTYPE type, uint_t va) | void Breakpoints::removeBP(BPXTYPE type, duint va) | ||||||
| { | { | ||||||
|     BPMAP wBPList; |     BPMAP wBPList; | ||||||
| 
 | 
 | ||||||
|  | @ -260,7 +260,7 @@ void Breakpoints::toggleBPByDisabling(const BRIDGEBP & bp) | ||||||
|  * |  * | ||||||
|  * @return      Nothing. |  * @return      Nothing. | ||||||
|  */ |  */ | ||||||
| void Breakpoints::toggleBPByDisabling(BPXTYPE type, uint_t va) | void Breakpoints::toggleBPByDisabling(BPXTYPE type, duint va) | ||||||
| { | { | ||||||
|     BPMAP wBPList; |     BPMAP wBPList; | ||||||
| 
 | 
 | ||||||
|  | @ -287,7 +287,7 @@ void Breakpoints::toggleBPByDisabling(BPXTYPE type, uint_t va) | ||||||
|  * |  * | ||||||
|  * @return      enabled/disabled. |  * @return      enabled/disabled. | ||||||
|  */ |  */ | ||||||
| BPXSTATE Breakpoints::BPState(BPXTYPE type, uint_t va) | BPXSTATE Breakpoints::BPState(BPXTYPE type, duint va) | ||||||
| { | { | ||||||
|     BPMAP wBPList; |     BPMAP wBPList; | ||||||
|     BPXSTATE result = bp_non_existent; |     BPXSTATE result = bp_non_existent; | ||||||
|  | @ -330,7 +330,7 @@ BPXSTATE Breakpoints::BPState(BPXTYPE type, uint_t va) | ||||||
|  * |  * | ||||||
|  * @return      Nothing. |  * @return      Nothing. | ||||||
|  */ |  */ | ||||||
| void Breakpoints::toggleBPByRemoving(BPXTYPE type, uint_t va) | void Breakpoints::toggleBPByRemoving(BPXTYPE type, duint va) | ||||||
| { | { | ||||||
|     BPMAP wBPList; |     BPMAP wBPList; | ||||||
|     bool wNormalWasRemoved = false; |     bool wNormalWasRemoved = false; | ||||||
|  |  | ||||||
|  | @ -17,17 +17,17 @@ class Breakpoints : public QObject | ||||||
| 
 | 
 | ||||||
| public: | public: | ||||||
|     explicit Breakpoints(QObject* parent = 0); |     explicit Breakpoints(QObject* parent = 0); | ||||||
|     static void setBP(BPXTYPE type, uint_t va); |     static void setBP(BPXTYPE type, duint va); | ||||||
|     static void enableBP(const BRIDGEBP & bp); |     static void enableBP(const BRIDGEBP & bp); | ||||||
|     static void enableBP(BPXTYPE type, uint_t va); |     static void enableBP(BPXTYPE type, duint va); | ||||||
|     static void disableBP(const BRIDGEBP & bp); |     static void disableBP(const BRIDGEBP & bp); | ||||||
|     static void disableBP(BPXTYPE type, uint_t va); |     static void disableBP(BPXTYPE type, duint va); | ||||||
|     static void removeBP(const BRIDGEBP & bp); |     static void removeBP(const BRIDGEBP & bp); | ||||||
|     static void removeBP(BPXTYPE type, uint_t va); |     static void removeBP(BPXTYPE type, duint va); | ||||||
|     static void toggleBPByDisabling(const BRIDGEBP & bp); |     static void toggleBPByDisabling(const BRIDGEBP & bp); | ||||||
|     static void toggleBPByDisabling(BPXTYPE type, uint_t va); |     static void toggleBPByDisabling(BPXTYPE type, duint va); | ||||||
|     static void toggleBPByRemoving(BPXTYPE type, uint_t va); |     static void toggleBPByRemoving(BPXTYPE type, duint va); | ||||||
|     static BPXSTATE BPState(BPXTYPE type, uint_t va); |     static BPXSTATE BPState(BPXTYPE type, duint va); | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| #endif // BREAKPOINTS_H
 | #endif // BREAKPOINTS_H
 | ||||||
|  |  | ||||||
|  | @ -167,10 +167,10 @@ Configuration::Configuration() : QObject() | ||||||
|     defaultBools.insert("Engine", engineBool); |     defaultBools.insert("Engine", engineBool); | ||||||
| 
 | 
 | ||||||
|     //uint settings
 |     //uint settings
 | ||||||
|     QMap<QString, uint_t> hexdumpUint; |     QMap<QString, duint> hexdumpUint; | ||||||
|     hexdumpUint.insert("DefaultView", 0); |     hexdumpUint.insert("DefaultView", 0); | ||||||
|     defaultUints.insert("HexDump", hexdumpUint); |     defaultUints.insert("HexDump", hexdumpUint); | ||||||
|     QMap<QString, uint_t> disasmUint; |     QMap<QString, duint> disasmUint; | ||||||
|     disasmUint.insert("MaxModuleSize", -1); |     disasmUint.insert("MaxModuleSize", -1); | ||||||
|     defaultUints.insert("Disassembler", disasmUint); |     defaultUints.insert("Disassembler", disasmUint); | ||||||
| 
 | 
 | ||||||
|  | @ -382,7 +382,7 @@ void Configuration::readUints() | ||||||
|     for(int i = 0; i < Uints.size(); i++) |     for(int i = 0; i < Uints.size(); i++) | ||||||
|     { |     { | ||||||
|         QString category = Uints.keys().at(i); |         QString category = Uints.keys().at(i); | ||||||
|         QMap<QString, uint_t>* currentUint = &Uints[category]; |         QMap<QString, duint>* currentUint = &Uints[category]; | ||||||
|         for(int j = 0; j < currentUint->size(); j++) |         for(int j = 0; j < currentUint->size(); j++) | ||||||
|         { |         { | ||||||
|             QString id = (*currentUint).keys().at(j); |             QString id = (*currentUint).keys().at(j); | ||||||
|  | @ -397,7 +397,7 @@ void Configuration::writeUints() | ||||||
|     for(int i = 0; i < Uints.size(); i++) |     for(int i = 0; i < Uints.size(); i++) | ||||||
|     { |     { | ||||||
|         QString category = Uints.keys().at(i); |         QString category = Uints.keys().at(i); | ||||||
|         QMap<QString, uint_t>* currentUint = &Uints[category]; |         QMap<QString, duint>* currentUint = &Uints[category]; | ||||||
|         for(int j = 0; j < currentUint->size(); j++) |         for(int j = 0; j < currentUint->size(); j++) | ||||||
|         { |         { | ||||||
|             QString id = (*currentUint).keys().at(j); |             QString id = (*currentUint).keys().at(j); | ||||||
|  | @ -523,7 +523,7 @@ void Configuration::setBool(const QString category, const QString id, const bool | ||||||
|     msg.exec(); |     msg.exec(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| const uint_t Configuration::getUint(const QString category, const QString id) const | const duint Configuration::getUint(const QString category, const QString id) const | ||||||
| { | { | ||||||
|     if(Uints.contains(category)) |     if(Uints.contains(category)) | ||||||
|     { |     { | ||||||
|  | @ -542,7 +542,7 @@ const uint_t Configuration::getUint(const QString category, const QString id) co | ||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void Configuration::setUint(const QString category, const QString id, const uint_t i) | void Configuration::setUint(const QString category, const QString id, const duint i) | ||||||
| { | { | ||||||
|     if(Uints.contains(category)) |     if(Uints.contains(category)) | ||||||
|     { |     { | ||||||
|  | @ -659,7 +659,7 @@ bool Configuration::boolToConfig(const QString category, const QString id, const | ||||||
|     return BridgeSettingSetUint(category.toUtf8().constData(), id.toUtf8().constData(), bBool); |     return BridgeSettingSetUint(category.toUtf8().constData(), id.toUtf8().constData(), bBool); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| uint_t Configuration::uintFromConfig(const QString category, const QString id) | duint Configuration::uintFromConfig(const QString category, const QString id) | ||||||
| { | { | ||||||
|     duint setting; |     duint setting; | ||||||
|     if(!BridgeSettingGetUint(category.toUtf8().constData(), id.toUtf8().constData(), &setting)) |     if(!BridgeSettingGetUint(category.toUtf8().constData(), id.toUtf8().constData(), &setting)) | ||||||
|  | @ -675,7 +675,7 @@ uint_t Configuration::uintFromConfig(const QString category, const QString id) | ||||||
|     return setting; |     return setting; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool Configuration::uintToConfig(const QString category, const QString id, uint_t i) | bool Configuration::uintToConfig(const QString category, const QString id, duint i) | ||||||
| { | { | ||||||
|     return BridgeSettingSetUint(category.toUtf8().constData(), id.toUtf8().constData(), i); |     return BridgeSettingSetUint(category.toUtf8().constData(), id.toUtf8().constData(), i); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -55,8 +55,8 @@ public: | ||||||
|     const QColor getColor(const QString id) const; |     const QColor getColor(const QString id) const; | ||||||
|     const bool getBool(const QString category, const QString id) const; |     const bool getBool(const QString category, const QString id) const; | ||||||
|     void setBool(const QString category, const QString id, const bool b); |     void setBool(const QString category, const QString id, const bool b); | ||||||
|     const uint_t getUint(const QString category, const QString id) const; |     const duint getUint(const QString category, const QString id) const; | ||||||
|     void setUint(const QString category, const QString id, const uint_t i); |     void setUint(const QString category, const QString id, const duint i); | ||||||
|     const QFont getFont(const QString id) const; |     const QFont getFont(const QString id) const; | ||||||
|     const Shortcut getShortcut(const QString key_id) const; |     const Shortcut getShortcut(const QString key_id) const; | ||||||
|     void setShortcut(const QString key_id, const QKeySequence key_sequence); |     void setShortcut(const QString key_id, const QKeySequence key_sequence); | ||||||
|  | @ -64,14 +64,14 @@ public: | ||||||
|     //default setting maps
 |     //default setting maps
 | ||||||
|     QMap<QString, QColor> defaultColors; |     QMap<QString, QColor> defaultColors; | ||||||
|     QMap<QString, QMap<QString, bool>> defaultBools; |     QMap<QString, QMap<QString, bool>> defaultBools; | ||||||
|     QMap<QString, QMap<QString, uint_t>> defaultUints; |     QMap<QString, QMap<QString, duint>> defaultUints; | ||||||
|     QMap<QString, QFont> defaultFonts; |     QMap<QString, QFont> defaultFonts; | ||||||
|     QMap<QString, Shortcut> defaultShortcuts; |     QMap<QString, Shortcut> defaultShortcuts; | ||||||
| 
 | 
 | ||||||
|     //public variables
 |     //public variables
 | ||||||
|     QMap<QString, QColor> Colors; |     QMap<QString, QColor> Colors; | ||||||
|     QMap<QString, QMap<QString, bool>> Bools; |     QMap<QString, QMap<QString, bool>> Bools; | ||||||
|     QMap<QString, QMap<QString, uint_t>> Uints; |     QMap<QString, QMap<QString, duint>> Uints; | ||||||
|     QMap<QString, QFont> Fonts; |     QMap<QString, QFont> Fonts; | ||||||
|     QMap<QString, Shortcut> Shortcuts; |     QMap<QString, Shortcut> Shortcuts; | ||||||
| 
 | 
 | ||||||
|  | @ -87,8 +87,8 @@ private: | ||||||
|     bool colorToConfig(const QString id, const QColor color); |     bool colorToConfig(const QString id, const QColor color); | ||||||
|     bool boolFromConfig(const QString category, const QString id); |     bool boolFromConfig(const QString category, const QString id); | ||||||
|     bool boolToConfig(const QString category, const QString id, bool bBool); |     bool boolToConfig(const QString category, const QString id, bool bBool); | ||||||
|     uint_t uintFromConfig(const QString category, const QString id); |     duint uintFromConfig(const QString category, const QString id); | ||||||
|     bool uintToConfig(const QString category, const QString id, uint_t i); |     bool uintToConfig(const QString category, const QString id, duint i); | ||||||
|     QFont fontFromConfig(const QString id); |     QFont fontFromConfig(const QString id); | ||||||
|     bool fontToConfig(const QString id, const QFont font); |     bool fontToConfig(const QString id, const QFont font); | ||||||
|     QString shortcutFromConfig(const QString id); |     QString shortcutFromConfig(const QString id); | ||||||
|  |  | ||||||
|  | @ -4,7 +4,7 @@ | ||||||
| #include <QString> | #include <QString> | ||||||
| #include "NewTypes.h" | #include "NewTypes.h" | ||||||
| 
 | 
 | ||||||
| static QString AddressToString(int_t Address) | static QString AddressToString(dsint Address) | ||||||
| { | { | ||||||
|     //
 |     //
 | ||||||
|     // This function exists because of how QT handles
 |     // This function exists because of how QT handles
 | ||||||
|  |  | ||||||
|  | @ -14,7 +14,7 @@ public: | ||||||
|     void stop(); |     void stop(); | ||||||
| 
 | 
 | ||||||
| signals: | signals: | ||||||
|     void expressionChanged(bool validExpression, bool validPointer, int_t value); |     void expressionChanged(bool validExpression, bool validPointer, dsint value); | ||||||
| 
 | 
 | ||||||
| public slots: | public slots: | ||||||
|     void textChanged(QString text); |     void textChanged(QString text); | ||||||
|  |  | ||||||
|  | @ -59,8 +59,8 @@ int main(int argc, char* argv[]) | ||||||
|     application.setFont(ConfigFont("Application")); |     application.setFont(ConfigFont("Application")); | ||||||
| 
 | 
 | ||||||
|     // Register custom data types
 |     // Register custom data types
 | ||||||
|     qRegisterMetaType<int_t>("int_t"); |     qRegisterMetaType<dsint>("dsint"); | ||||||
|     qRegisterMetaType<uint_t>("uint_t"); |     qRegisterMetaType<duint>("duint"); | ||||||
|     qRegisterMetaType<byte_t>("byte_t"); |     qRegisterMetaType<byte_t>("byte_t"); | ||||||
|     qRegisterMetaType<DBGSTATE>("DBGSTATE"); |     qRegisterMetaType<DBGSTATE>("DBGSTATE"); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -155,7 +155,6 @@ HEADERS += \ | ||||||
|     Src/Disassembler/QBeaEngine.h \ |     Src/Disassembler/QBeaEngine.h \ | ||||||
|     Src/Memory/MemoryPage.h \ |     Src/Memory/MemoryPage.h \ | ||||||
|     Src/Bridge/Bridge.h \ |     Src/Bridge/Bridge.h \ | ||||||
|     Src/Global/NewTypes.h \ |  | ||||||
|     Src/Exports.h \ |     Src/Exports.h \ | ||||||
|     Src/Imports.h \ |     Src/Imports.h \ | ||||||
|     Src/BasicView/StdTable.h \ |     Src/BasicView/StdTable.h \ | ||||||
|  |  | ||||||
|  | @ -28,3 +28,12 @@ typedef signed long long	dsint; | ||||||
| typedef unsigned long __w64 duint; | typedef unsigned long __w64 duint; | ||||||
| typedef signed long __w64	dsint; | typedef signed long __w64	dsint; | ||||||
| #endif // COMPILE_64
 | #endif // COMPILE_64
 | ||||||
|  | 
 | ||||||
|  | typedef short int16; | ||||||
|  | typedef unsigned short uint16; | ||||||
|  | 
 | ||||||
|  | typedef int int32; | ||||||
|  | typedef unsigned int uint32; | ||||||
|  | 
 | ||||||
|  | typedef long long int64; | ||||||
|  | typedef unsigned long long uint64; | ||||||
		Loading…
	
		Reference in New Issue