MCPcopy Create free account
hub / github.com/KDE/kdevelop / updateRegisters

Method updateRegisters

plugins/debuggercommon/registers/registercontroller.cpp:21–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19using namespace KDevMI;
20
21void IRegisterController::updateRegisters(const GroupsName& group)
22{
23 if (!m_debugSession->acceptsCommands()) {
24 return;
25 }
26
27 if (m_pendingGroups.contains(group)) {
28 qCDebug(DEBUGGERCOMMON) << "Already updating " << group.name();
29 return;
30 }
31
32 if (group.name().isEmpty()) {
33 const auto namesOfRegisterGroups = this->namesOfRegisterGroups();
34 for (const GroupsName& g : namesOfRegisterGroups) {
35 updateRegisters(g);
36 }
37 return;
38 } else {
39 qCDebug(DEBUGGERCOMMON) << "Updating: " << group.name();
40 m_pendingGroups << group;
41 }
42
43 QString registers;
44 Format currentFormat = formats(group).first();
45 switch (currentFormat) {
46 case Binary:
47 registers = QStringLiteral("t ");
48 break;
49 case Octal:
50 registers = QStringLiteral("o ");
51 break;
52 case Decimal :
53 registers = QStringLiteral("d ");
54 break;
55 case Hexadecimal:
56 registers = QStringLiteral("x ");
57 break;
58 case Raw:
59 registers = QStringLiteral("r ");
60 break;
61 case Unsigned:
62 registers = QStringLiteral("u ");
63 break;
64 default:
65 break;
66 }
67
68 //float point registers have only two reasonable format.
69 Mode currentMode = modes(group).first();
70 if (((currentMode >= v4_float && currentMode <= v2_double) ||
71 (currentMode >= f32 && currentMode <= f64) || group.type() == floatPoint) && currentFormat != Raw) {
72 registers = QStringLiteral("N ");
73 }
74
75 if (group.type() == flag) {
76 registers += numberForName(group.flagName());
77 } else {
78 const auto names = registerNamesForGroup(group);

Callers

nothing calls this directly

Calls 10

acceptsCommandsMethod · 0.80
flagNameMethod · 0.80
addCommandMethod · 0.60
containsMethod · 0.45
nameMethod · 0.45
isEmptyMethod · 0.45
namesOfRegisterGroupsMethod · 0.45
firstMethod · 0.45
typeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected