MCPcopy Create free account
hub / github.com/Kitware/CMake / HandleVariablesRequest

Method HandleVariablesRequest

Source/cmDebuggerVariables.cxx:70–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70dap::array<dap::Variable> cmDebuggerVariables::HandleVariablesRequest()
71{
72 dap::array<dap::Variable> variables;
73
74 if (GetKeyValuesFunction) {
75 auto values = GetKeyValuesFunction();
76 for (auto const& entry : values) {
77 if (IgnoreEmptyStringEntries && entry.Type == "string" &&
78 entry.Value.empty()) {
79 continue;
80 }
81 variables.push_back(dap::Variable{
82 {},
83 {},
84 {},
85 entry.Name,
86 {},
87 PrivateDataHint,
88 SupportsVariableType ? entry.Type : dap::optional<dap::string>(),
89 entry.Value,
90 0 });
91 }
92 }
93
94 EnumerateSubVariablesIfAny(variables);
95
96 if (EnableSorting) {
97 std::sort(variables.begin(), variables.end(),
98 [](dap::Variable const& a, dap::Variable const& b) {
99 return a.name < b.name;
100 });
101 }
102 return variables;
103}
104
105void cmDebuggerVariables::EnumerateSubVariablesIfAny(
106 dap::array<dap::Variable>& toBeReturned) const

Callers 15

cmDebuggerVariablesMethod · 0.95
testConstructorsFunction · 0.45
testSortTheResultFunction · 0.45
testCreateFromPolicyMapFunction · 0.45
testCreateFromPairVectorFunction · 0.45
testCreateFromSetFunction · 0.45
testCreateFromTargetFunction · 0.45

Calls 4

push_backMethod · 0.80
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by 15

testConstructorsFunction · 0.36
testSortTheResultFunction · 0.36
testCreateFromPolicyMapFunction · 0.36
testCreateFromPairVectorFunction · 0.36
testCreateFromSetFunction · 0.36
testCreateFromTargetFunction · 0.36
testCreateFromTestsFunction · 0.36