|
|
@ -3,9 +3,9 @@
|
|
|
|
qvminspector_t::qvminspector_t( qwidget_t *parent ) : qmain_window_t( parent ), file_header( nullptr ), vmctx( nullptr )
|
|
|
|
qvminspector_t::qvminspector_t( qwidget_t *parent ) : qmain_window_t( parent ), file_header( nullptr ), vmctx( nullptr )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ui.setupUi( this );
|
|
|
|
ui.setupUi( this );
|
|
|
|
ui.virt_instrs->setColumnWidth( 0, 175 );
|
|
|
|
ui.virt_instrs->setColumnWidth( 0, 180 );
|
|
|
|
ui.virt_instrs->setColumnWidth( 1, 140 );
|
|
|
|
ui.virt_instrs->setColumnWidth( 1, 150 );
|
|
|
|
ui.virt_instrs->setColumnWidth( 2, 200 );
|
|
|
|
ui.virt_instrs->setColumnWidth( 2, 190 );
|
|
|
|
ui.virt_instrs->setColumnWidth( 3, 200 );
|
|
|
|
ui.virt_instrs->setColumnWidth( 3, 200 );
|
|
|
|
|
|
|
|
|
|
|
|
connect( ui.action_open, &QAction::triggered, this, &qvminspector_t::on_open );
|
|
|
|
connect( ui.action_open, &QAction::triggered, this, &qvminspector_t::on_open );
|
|
|
@ -141,7 +141,7 @@ void qvminspector_t::add_branch_children( qtree_widget_item_t *item, std::uintpt
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// skip if this code block begin address is not branch_addr...
|
|
|
|
// skip if this code block begin address is not branch_addr...
|
|
|
|
if ( code_block->vip_begin != branch_addr && code_block->vip_begin != branch_addr - 2 &&
|
|
|
|
if ( code_block->vip_begin != branch_addr && code_block->vip_begin != branch_addr - 2 &&
|
|
|
|
code_block->vip_begin != branch_addr - 1)
|
|
|
|
code_block->vip_begin != branch_addr - 1 )
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
|
|
dbg_print( qstring_t( "> code block %1 (block_%2), number of vinstrs = %3..." )
|
|
|
|
dbg_print( qstring_t( "> code block %1 (block_%2), number of vinstrs = %3..." )
|
|
|
@ -157,9 +157,14 @@ void qvminspector_t::add_branch_children( qtree_widget_item_t *item, std::uintpt
|
|
|
|
auto virt_instr_entry = new qtree_widget_item_t;
|
|
|
|
auto virt_instr_entry = new qtree_widget_item_t;
|
|
|
|
|
|
|
|
|
|
|
|
// virtual instruction image base'ed rva... (column 1)...
|
|
|
|
// virtual instruction image base'ed rva... (column 1)...
|
|
|
|
virt_instr_entry->setText( 0, qstring_t::number( ( virt_instr->trace_data.vip - file_header->module_base ) +
|
|
|
|
virt_instr_entry->setText(
|
|
|
|
file_header->image_base,
|
|
|
|
0, QString( "block_%1+%2" )
|
|
|
|
16 ) );
|
|
|
|
.arg( ( branch_addr - file_header->module_base ) + file_header->image_base, 0, 16 )
|
|
|
|
|
|
|
|
.arg( idx ? code_block->vip_begin > virt_instr->trace_data.vip
|
|
|
|
|
|
|
|
? code_block->vip_begin - virt_instr->trace_data.vip
|
|
|
|
|
|
|
|
: virt_instr->trace_data.vip - code_block->vip_begin
|
|
|
|
|
|
|
|
: 0u,
|
|
|
|
|
|
|
|
0, 16 ) );
|
|
|
|
|
|
|
|
|
|
|
|
// virtual instruction operand bytes... (column 2)...
|
|
|
|
// virtual instruction operand bytes... (column 2)...
|
|
|
|
qstring_t operand_bytes;
|
|
|
|
qstring_t operand_bytes;
|
|
|
@ -263,9 +268,14 @@ void qvminspector_t::update_ui()
|
|
|
|
auto virt_instr_entry = new qtree_widget_item_t;
|
|
|
|
auto virt_instr_entry = new qtree_widget_item_t;
|
|
|
|
|
|
|
|
|
|
|
|
// virtual instruction image base'ed rva... (column 1)...
|
|
|
|
// virtual instruction image base'ed rva... (column 1)...
|
|
|
|
virt_instr_entry->setText( 0, qstring_t::number( ( virt_instr->trace_data.vip - file_header->module_base ) +
|
|
|
|
virt_instr_entry->setText(
|
|
|
|
file_header->image_base,
|
|
|
|
0, QString( "block_%1+%2" )
|
|
|
|
16 ) );
|
|
|
|
.arg( ( code_block->vip_begin - file_header->module_base ) + file_header->image_base, 0, 16 )
|
|
|
|
|
|
|
|
.arg( idx ? code_block->vip_begin > virt_instr->trace_data.vip
|
|
|
|
|
|
|
|
? code_block->vip_begin - virt_instr->trace_data.vip
|
|
|
|
|
|
|
|
: virt_instr->trace_data.vip - code_block->vip_begin
|
|
|
|
|
|
|
|
: 0u,
|
|
|
|
|
|
|
|
0, 16 ) );
|
|
|
|
|
|
|
|
|
|
|
|
// virtual instruction operand bytes... (column 2)...
|
|
|
|
// virtual instruction operand bytes... (column 2)...
|
|
|
|
qstring_t operand_bytes;
|
|
|
|
qstring_t operand_bytes;
|
|
|
|