add pci to hexwidget sidepanel (#2219)

This commit is contained in:
Surendrajat 2020-05-30 15:30:29 +05:30 committed by GitHub
parent cd6fc26ed1
commit 4ddba1b8d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 8 deletions

View File

@ -250,25 +250,28 @@ void HexdumpWidget::updateParseWindow(RVA start_address, int size)
case 3: // C byte array case 3: // C byte array
selectedCommand = "pc"; selectedCommand = "pc";
break; break;
case 4: // C half-word case 4: // C byte array with instructions
selectedCommand = "pci";
break;
case 5: // C half-word
selectedCommand = "pch"; selectedCommand = "pch";
break; break;
case 5: // C word case 6: // C word
selectedCommand = "pcw"; selectedCommand = "pcw";
break; break;
case 6: // C dword case 7: // C dword
selectedCommand = "pcd"; selectedCommand = "pcd";
break; break;
case 7: // Python case 8: // Python
selectedCommand = "pcp"; selectedCommand = "pcp";
break; break;
case 8: // JSON case 9: // JSON
selectedCommand = "pcj"; selectedCommand = "pcj";
break; break;
case 9: // JavaScript case 10: // JavaScript
selectedCommand = "pcJ"; selectedCommand = "pcJ";
break; break;
case 10: // Yara case 11: // Yara
selectedCommand = "pcy"; selectedCommand = "pcy";
break; break;
} }
@ -292,7 +295,7 @@ void HexdumpWidget::updateParseWindow(RVA start_address, int size)
void HexdumpWidget::on_parseTypeComboBox_currentTextChanged(const QString &) void HexdumpWidget::on_parseTypeComboBox_currentTextChanged(const QString &)
{ {
if (ui->parseTypeComboBox->currentIndex() == 0) { if (ui->parseTypeComboBox->currentIndex() == 0 || ui->parseTypeComboBox->currentIndex() == 4) {
ui->hexSideFrame_2->show(); ui->hexSideFrame_2->show();
} else { } else {
ui->hexSideFrame_2->hide(); ui->hexSideFrame_2->hide();

View File

@ -129,6 +129,11 @@
<string>C bytes</string> <string>C bytes</string>
</property> </property>
</item> </item>
<item>
<property name="text">
<string>C bytes with instructions</string>
</property>
</item>
<item> <item>
<property name="text"> <property name="text">
<string>C half-words (2 byte)</string> <string>C half-words (2 byte)</string>