MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / updateDisplay

Method updateDisplay

examples/triage/analysisinfo.cpp:56–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54
55
56void AnalysisInfoWidget::updateDisplay()
57{
58 auto defaultPlatform = m_data->GetDefaultPlatform();
59 if (defaultPlatform)
60 {
61 auto callingConvention = defaultPlatform->GetDefaultCallingConvention();
62 if (callingConvention)
63 {
64 auto gpRegister = callingConvention->GetGlobalPointerRegister();
65 if (gpRegister != BN_INVALID_REGISTER)
66 {
67 auto gpValue = m_data->GetGlobalPointerValue();
68 std::string gpString = getStringForRegisterValue(m_data->GetDefaultArchitecture(), gpValue);
69 std::string gpExtraString = std::string(" @ ") + m_data->GetDefaultArchitecture()->GetRegisterName(gpRegister);
70 if (m_data->UserGlobalPointerValueSet())
71 gpExtraString += " (*)";
72
73 m_gpLabel->setText(QString::fromStdString(gpString));
74 m_gpExtraLabel->setText(QString::fromStdString(gpExtraString));
75 return;
76 }
77 }
78 }
79
80 m_gpLabel->setText("N/A");
81}

Callers

nothing calls this directly

Calls 7

GetDefaultPlatformMethod · 0.80
GetGlobalPointerValueMethod · 0.45
GetRegisterNameMethod · 0.45

Tested by

no test coverage detected