MCPcopy Create free account
hub / github.com/Vector35/debugger / getUsedRegisterNames

Method getUsedRegisterNames

ui/registerswidget.cpp:209–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207
208
209std::set<std::string> DebugRegistersListModel::getUsedRegisterNames()
210{
211 std::set<std::string> usedRegisterNames;
212 if (!m_controller->GetLiveView())
213 return usedRegisterNames;
214
215 auto pc = m_controller->IP();
216 auto arch = m_controller->GetLiveView()->GetDefaultArchitecture();
217 if (!arch)
218 return usedRegisterNames;
219
220 auto functions = m_controller->GetLiveView()->GetAnalysisFunctionsContainingAddress(pc);
221 if (functions.empty() || (!functions[0]))
222 return usedRegisterNames;
223
224 auto llil = functions[0]->GetLowLevelILIfAvailable();
225 if (!llil)
226 return usedRegisterNames;
227
228 auto regs = llil->GetRegisters();
229 for (const auto reg : regs)
230 {
231 const auto name = arch->GetRegisterName(reg);
232 usedRegisterNames.insert(name);
233 }
234
235 return usedRegisterNames;
236}
237
238
239void DebugRegistersListModel::updateRows(std::vector<DebugRegister> newRows)

Callers

nothing calls this directly

Calls 3

GetLiveViewMethod · 0.45
IPMethod · 0.45
GetRegistersMethod · 0.45

Tested by

no test coverage detected