aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui
diff options
context:
space:
mode:
Diffstat (limited to 'qtmips_gui')
-rw-r--r--qtmips_gui/coreview/instructionview.cpp2
-rw-r--r--qtmips_gui/programdock.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/qtmips_gui/coreview/instructionview.cpp b/qtmips_gui/coreview/instructionview.cpp
index 342a1d4..d989b7b 100644
--- a/qtmips_gui/coreview/instructionview.cpp
+++ b/qtmips_gui/coreview/instructionview.cpp
@@ -67,7 +67,7 @@ void InstructionView::paint(QPainter *painter, const QStyleOptionGraphicsItem *o
void InstructionView::instruction_update(const machine::Instruction &i, std::uint32_t inst_addr) {
QRectF prev_box = boundingRect();
- text.setText(i.to_str());
+ text.setText(i.to_str(inst_addr));
QRectF box = text.boundingRect();
text.setPos(-box.width()/2, GAP);
update(prev_box.united(boundingRect()));
diff --git a/qtmips_gui/programdock.cpp b/qtmips_gui/programdock.cpp
index 192352b..4c379eb 100644
--- a/qtmips_gui/programdock.cpp
+++ b/qtmips_gui/programdock.cpp
@@ -111,7 +111,7 @@ QList<QWidget*> ProgramView::row_widget(std::uint32_t address, QWidget *parent)
l->setFont(f);
l->setMinimumWidth(60);
if (memory != nullptr)
- l->setText(machine::Instruction(memory->read_word(address)).to_str());
+ l->setText(machine::Instruction(memory->read_word(address)).to_str(address));
widgs.append(l);
return widgs;