svf-lib 1.0.1731 → 1.0.1733
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SVF-linux/Release-build/svf/libSvfCore.a +0 -0
- package/SVF-linux/svf/include/AbstractExecution/ConsExeState.h +99 -96
- package/SVF-linux/svf/include/AbstractExecution/ExeState.h +66 -53
- package/SVF-linux/svf/include/AbstractExecution/IntervalExeState.h +66 -61
- package/SVF-linux/svf/include/AbstractExecution/SVFIR2ConsExeState.h +7 -7
- package/SVF-linux/svf/include/AbstractExecution/SVFIR2ItvExeState.h +20 -14
- package/SVF-osx/Release-build/svf/libSvfCore.a +0 -0
- package/SVF-osx/Release-build/svf-llvm/libSvfLLVM.a +0 -0
- package/SVF-osx/svf/include/AbstractExecution/ConsExeState.h +99 -96
- package/SVF-osx/svf/include/AbstractExecution/ExeState.h +64 -55
- package/SVF-osx/svf/include/AbstractExecution/IntervalExeState.h +65 -59
- package/SVF-osx/svf/include/AbstractExecution/SVFIR2ConsExeState.h +7 -7
- package/SVF-osx/svf/include/AbstractExecution/SVFIR2ItvExeState.h +18 -14
- package/package.json +1 -1
|
Binary file
|
|
@@ -54,10 +54,6 @@ public:
|
|
|
54
54
|
|
|
55
55
|
static ConsExeState globalConsES;
|
|
56
56
|
|
|
57
|
-
protected:
|
|
58
|
-
VarToValMap _varToVal;
|
|
59
|
-
LocToValMap _locToVal;
|
|
60
|
-
|
|
61
57
|
public:
|
|
62
58
|
ConsExeState(): ExeState(ExeState::SingleValueK) {}
|
|
63
59
|
|
|
@@ -101,8 +97,7 @@ public:
|
|
|
101
97
|
|
|
102
98
|
using ExeState::operator==;
|
|
103
99
|
using ExeState::operator!=;
|
|
104
|
-
|
|
105
|
-
//{%
|
|
100
|
+
|
|
106
101
|
bool operator==(const ConsExeState &rhs) const;
|
|
107
102
|
|
|
108
103
|
bool operator!=(const ConsExeState &other) const
|
|
@@ -114,113 +109,141 @@ public:
|
|
|
114
109
|
|
|
115
110
|
u32_t hash() const override;
|
|
116
111
|
|
|
117
|
-
|
|
118
|
-
bool joinWith(const ConsExeState &rhs);
|
|
112
|
+
protected:
|
|
119
113
|
|
|
120
|
-
|
|
121
|
-
|
|
114
|
+
VarToValMap _varToVal; ///< Map a variable (symbol) to its constant value
|
|
115
|
+
LocToValMap _locToVal; ///< Map a memory address to its stored constant value
|
|
122
116
|
|
|
123
|
-
|
|
124
|
-
void applySummary(const ConsExeState &summary);
|
|
117
|
+
public:
|
|
125
118
|
|
|
126
|
-
///
|
|
127
|
-
|
|
119
|
+
/// get memory addresses of variable
|
|
120
|
+
virtual Addrs &getAddrs(u32_t id) override
|
|
128
121
|
{
|
|
129
|
-
|
|
122
|
+
auto it = globalConsES._varToAddrs.find(id);
|
|
123
|
+
if (it != globalConsES._varToAddrs.end()) return it->second;
|
|
124
|
+
return _varToAddrs[id];
|
|
130
125
|
}
|
|
131
126
|
|
|
132
|
-
///
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
std::string varToString(u32_t varId) const;
|
|
143
|
-
|
|
144
|
-
std::string locToString(u32_t objId) const;
|
|
145
|
-
|
|
146
|
-
bool applySelect(u32_t res, u32_t cond, u32_t top, u32_t fop);
|
|
127
|
+
/// get constant value of variable
|
|
128
|
+
inline SingleAbsValue &operator[](u32_t varId)
|
|
129
|
+
{
|
|
130
|
+
auto it = globalConsES._varToVal.find(varId);
|
|
131
|
+
if (it != globalConsES._varToVal.end())
|
|
132
|
+
return it->second;
|
|
133
|
+
else
|
|
134
|
+
return _varToVal[varId];
|
|
135
|
+
}
|
|
147
136
|
|
|
148
|
-
|
|
137
|
+
/// whether the variable is in varToAddrs table
|
|
138
|
+
virtual inline bool inVarToAddrsTable(u32_t id) const override
|
|
139
|
+
{
|
|
140
|
+
return _varToAddrs.find(id) != _varToAddrs.end() ||
|
|
141
|
+
globalConsES._varToAddrs.find(id) != globalConsES._varToAddrs.end();
|
|
142
|
+
}
|
|
149
143
|
|
|
150
|
-
|
|
144
|
+
/// whether the variable is in varToVal table
|
|
145
|
+
inline bool inVarToValTable(u32_t varId) const
|
|
151
146
|
{
|
|
152
147
|
return _varToVal.count(varId) || globalConsES._varToVal.count(varId);
|
|
153
148
|
}
|
|
154
149
|
|
|
155
|
-
|
|
150
|
+
/// whether the memory address stores memory addresses
|
|
151
|
+
virtual inline bool inLocToAddrsTable(u32_t id) const override
|
|
156
152
|
{
|
|
157
|
-
|
|
158
|
-
s32_t virAddr = z3Expr2NumValue(loc);
|
|
159
|
-
assert(isVirtualMemAddress(virAddr) && "Pointer operand is not a physical address?");
|
|
160
|
-
u32_t objId = getInternalID(virAddr);
|
|
161
|
-
assert(getInternalID(objId) == objId && "SVFVar idx overflow > 0x7f000000?");
|
|
162
|
-
return inLocalLocToVal(objId);
|
|
153
|
+
return globalConsES._locToAddrs.find(id) != globalConsES._locToAddrs.end() || inLocalLocToAddrsTable(id);
|
|
163
154
|
}
|
|
164
155
|
|
|
165
|
-
|
|
156
|
+
/// whether the memory address stores constant value
|
|
157
|
+
inline bool inLocToValTable(u32_t varId) const
|
|
166
158
|
{
|
|
167
|
-
return _locToVal.count(varId);
|
|
159
|
+
return inLocalLocToValTable(varId) || globalConsES._locToVal.count(varId);
|
|
168
160
|
}
|
|
169
161
|
|
|
170
|
-
inline
|
|
162
|
+
inline const VarToValMap &getVarToVal() const
|
|
171
163
|
{
|
|
172
|
-
return
|
|
164
|
+
return _varToVal;
|
|
173
165
|
}
|
|
174
166
|
|
|
175
|
-
inline
|
|
167
|
+
inline const LocToValMap &getLocToVal() const
|
|
176
168
|
{
|
|
177
|
-
|
|
178
|
-
return eq((*this)[lhs], (*this)[rhs]);
|
|
169
|
+
return _locToVal;
|
|
179
170
|
}
|
|
180
|
-
//%}
|
|
181
171
|
|
|
182
|
-
virtual inline bool
|
|
172
|
+
virtual inline bool inLocalLocToAddrsTable(u32_t id) const
|
|
183
173
|
{
|
|
184
|
-
return
|
|
185
|
-
globalConsES._varToVAddrs.find(id) != globalConsES._varToVAddrs.end();
|
|
174
|
+
return _locToAddrs.find(id) != _locToAddrs.end();
|
|
186
175
|
}
|
|
187
176
|
|
|
188
|
-
|
|
177
|
+
inline bool inLocalLocToValTable(u32_t varId) const
|
|
189
178
|
{
|
|
190
|
-
return
|
|
179
|
+
return _locToVal.count(varId);
|
|
191
180
|
}
|
|
192
181
|
|
|
193
|
-
|
|
182
|
+
inline bool inLocalLocToValTable(const SingleAbsValue& addr) const
|
|
194
183
|
{
|
|
195
|
-
return
|
|
184
|
+
return _locToVal.count(getInternalID(addr.getNumeral()));
|
|
196
185
|
}
|
|
197
186
|
|
|
198
|
-
|
|
187
|
+
public:
|
|
188
|
+
|
|
189
|
+
/// Merge rhs into this
|
|
190
|
+
bool joinWith(const ConsExeState &rhs);
|
|
191
|
+
|
|
192
|
+
/// Build global execution state
|
|
193
|
+
void buildGlobES(ConsExeState &globES, Set<u32_t> &vars);
|
|
194
|
+
|
|
195
|
+
/// Update symbolic states based on the summary/side-effect of callee
|
|
196
|
+
void applySummary(const ConsExeState &summary);
|
|
197
|
+
|
|
198
|
+
inline bool equalVar(u32_t lhs, u32_t rhs)
|
|
199
199
|
{
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
return _varToVAddrs[id];
|
|
200
|
+
if (!inVarToValTable(lhs) || !inVarToValTable(rhs)) return false;
|
|
201
|
+
return eq((*this)[lhs], (*this)[rhs]);
|
|
203
202
|
}
|
|
204
203
|
|
|
205
|
-
|
|
204
|
+
/// Whether state is null state (uninitialized state)
|
|
205
|
+
inline bool isNullState() const
|
|
206
|
+
{
|
|
207
|
+
return _varToVal.size() == 1 && eq((*_varToVal.begin()).second, -1) && _locToVal.empty();
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/// Print values of all expressions
|
|
211
|
+
void printExprValues() const;
|
|
212
|
+
|
|
213
|
+
/// Print values of all expressions
|
|
214
|
+
void printExprValues(std::ostream &oss) const override;
|
|
215
|
+
|
|
216
|
+
std::string toString() const override;
|
|
217
|
+
|
|
218
|
+
std::string pcToString() const;
|
|
219
|
+
|
|
220
|
+
std::string varToString(u32_t varId) const;
|
|
221
|
+
|
|
222
|
+
std::string locToString(u32_t objId) const;
|
|
223
|
+
|
|
224
|
+
bool applySelect(u32_t res, u32_t cond, u32_t top, u32_t fop);
|
|
225
|
+
|
|
226
|
+
bool applyPhi(u32_t res, std::vector<u32_t> &ops);
|
|
227
|
+
|
|
228
|
+
virtual Addrs &loadAddrs(u32_t addr) override
|
|
206
229
|
{
|
|
207
230
|
assert(isVirtualMemAddress(addr) && "not virtual address?");
|
|
208
231
|
u32_t objId = getInternalID(addr);
|
|
209
|
-
auto it =
|
|
210
|
-
if (it !=
|
|
232
|
+
auto it = _locToAddrs.find(objId);
|
|
233
|
+
if (it != _locToAddrs.end())
|
|
211
234
|
{
|
|
212
235
|
return it->second;
|
|
213
236
|
}
|
|
214
237
|
else
|
|
215
238
|
{
|
|
216
|
-
auto globIt = globalConsES.
|
|
217
|
-
if (globIt != globalConsES.
|
|
239
|
+
auto globIt = globalConsES._locToAddrs.find(objId);
|
|
240
|
+
if (globIt != globalConsES._locToAddrs.end())
|
|
218
241
|
{
|
|
219
242
|
return globIt->second;
|
|
220
243
|
}
|
|
221
244
|
else
|
|
222
245
|
{
|
|
223
|
-
return
|
|
246
|
+
return getAddrs(0);
|
|
224
247
|
}
|
|
225
248
|
}
|
|
226
249
|
}
|
|
@@ -228,15 +251,15 @@ public:
|
|
|
228
251
|
virtual std::string varToAddrs(u32_t varId) const override
|
|
229
252
|
{
|
|
230
253
|
std::stringstream exprName;
|
|
231
|
-
auto it =
|
|
232
|
-
if (it ==
|
|
254
|
+
auto it = _varToAddrs.find(varId);
|
|
255
|
+
if (it == _varToAddrs.end())
|
|
233
256
|
{
|
|
234
|
-
auto git = globalConsES.
|
|
235
|
-
if (git == globalConsES.
|
|
257
|
+
auto git = globalConsES._varToAddrs.find(varId);
|
|
258
|
+
if (git == globalConsES._varToAddrs.end())
|
|
236
259
|
exprName << "Var not in varToAddrs!\n";
|
|
237
260
|
else
|
|
238
261
|
{
|
|
239
|
-
const
|
|
262
|
+
const Addrs &vaddrs = git->second;
|
|
240
263
|
if (vaddrs.size() == 1)
|
|
241
264
|
{
|
|
242
265
|
exprName << "addr: {" << std::dec << getInternalID(*vaddrs.begin()) << "}\n";
|
|
@@ -254,7 +277,7 @@ public:
|
|
|
254
277
|
}
|
|
255
278
|
else
|
|
256
279
|
{
|
|
257
|
-
const
|
|
280
|
+
const Addrs &vaddrs = it->second;
|
|
258
281
|
if (vaddrs.size() == 1)
|
|
259
282
|
{
|
|
260
283
|
exprName << "addr: {" << std::dec << getInternalID(*vaddrs.begin()) << "}\n";
|
|
@@ -275,15 +298,15 @@ public:
|
|
|
275
298
|
virtual std::string locToAddrs(u32_t objId) const override
|
|
276
299
|
{
|
|
277
300
|
std::stringstream exprName;
|
|
278
|
-
auto it =
|
|
279
|
-
if (it ==
|
|
301
|
+
auto it = _locToAddrs.find(objId);
|
|
302
|
+
if (it == _locToAddrs.end())
|
|
280
303
|
{
|
|
281
|
-
auto git = globalConsES.
|
|
282
|
-
if (git == globalConsES.
|
|
304
|
+
auto git = globalConsES._locToAddrs.find(objId);
|
|
305
|
+
if (git == globalConsES._locToAddrs.end())
|
|
283
306
|
exprName << "Obj not in locToVal!\n";
|
|
284
307
|
else
|
|
285
308
|
{
|
|
286
|
-
const
|
|
309
|
+
const Addrs &vaddrs = git->second;
|
|
287
310
|
if (vaddrs.size() == 1)
|
|
288
311
|
{
|
|
289
312
|
exprName << "addr: {" << std::dec << getInternalID(*vaddrs.begin()) << "}\n";
|
|
@@ -301,7 +324,7 @@ public:
|
|
|
301
324
|
}
|
|
302
325
|
else
|
|
303
326
|
{
|
|
304
|
-
const
|
|
327
|
+
const Addrs &vaddrs = it->second;
|
|
305
328
|
if (vaddrs.size() == 1)
|
|
306
329
|
{
|
|
307
330
|
exprName << "addr: {" << std::dec << getInternalID(*vaddrs.begin()) << "}\n";
|
|
@@ -338,22 +361,10 @@ public:
|
|
|
338
361
|
|
|
339
362
|
public:
|
|
340
363
|
|
|
341
|
-
inline const VarToValMap &getVarToVal() const
|
|
342
|
-
{
|
|
343
|
-
return _varToVal;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
inline const LocToValMap &getLocToVal() const
|
|
347
|
-
{
|
|
348
|
-
return _locToVal;
|
|
349
|
-
}
|
|
350
364
|
|
|
351
365
|
|
|
352
366
|
s64_t getNumber(u32_t lhs);
|
|
353
367
|
|
|
354
|
-
public:
|
|
355
|
-
|
|
356
|
-
|
|
357
368
|
static inline SingleAbsValue getIntOneZ3Expr()
|
|
358
369
|
{
|
|
359
370
|
return getContext().int_val(1);
|
|
@@ -375,14 +386,6 @@ public:
|
|
|
375
386
|
}
|
|
376
387
|
|
|
377
388
|
public:
|
|
378
|
-
inline SingleAbsValue &operator[](u32_t varId)
|
|
379
|
-
{
|
|
380
|
-
auto it = globalConsES._varToVal.find(varId);
|
|
381
|
-
if (it != globalConsES._varToVal.end())
|
|
382
|
-
return it->second;
|
|
383
|
-
else
|
|
384
|
-
return _varToVal[varId];
|
|
385
|
-
}
|
|
386
389
|
|
|
387
390
|
/// Store value to location
|
|
388
391
|
bool store(const SingleAbsValue &loc, const SingleAbsValue &value);
|
|
@@ -49,9 +49,9 @@ class ExeState
|
|
|
49
49
|
|
|
50
50
|
public:
|
|
51
51
|
|
|
52
|
-
typedef AddressValue
|
|
53
|
-
typedef Map<u32_t,
|
|
54
|
-
/// Execution state
|
|
52
|
+
typedef AddressValue Addrs;
|
|
53
|
+
typedef Map<u32_t, Addrs> VarToAddrs;
|
|
54
|
+
/// Execution state type
|
|
55
55
|
enum ExeState_TYPE
|
|
56
56
|
{
|
|
57
57
|
IntervalK, SingleValueK
|
|
@@ -64,18 +64,18 @@ public:
|
|
|
64
64
|
|
|
65
65
|
virtual ~ExeState() = default;
|
|
66
66
|
|
|
67
|
-
ExeState(const ExeState &rhs) :
|
|
68
|
-
|
|
67
|
+
ExeState(const ExeState &rhs) : _varToAddrs(rhs._varToAddrs),
|
|
68
|
+
_locToAddrs(rhs._locToAddrs) {}
|
|
69
69
|
|
|
70
|
-
ExeState(ExeState &&rhs) noexcept:
|
|
71
|
-
|
|
70
|
+
ExeState(ExeState &&rhs) noexcept: _varToAddrs(std::move(rhs._varToAddrs)),
|
|
71
|
+
_locToAddrs(std::move(rhs._locToAddrs)) {}
|
|
72
72
|
|
|
73
73
|
ExeState &operator=(const ExeState &rhs)
|
|
74
74
|
{
|
|
75
75
|
if(*this != rhs)
|
|
76
76
|
{
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
_varToAddrs = rhs._varToAddrs;
|
|
78
|
+
_locToAddrs = rhs._locToAddrs;
|
|
79
79
|
}
|
|
80
80
|
return *this;
|
|
81
81
|
}
|
|
@@ -84,24 +84,49 @@ public:
|
|
|
84
84
|
{
|
|
85
85
|
if (this != &rhs)
|
|
86
86
|
{
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
_varToAddrs = std::move(rhs._varToAddrs);
|
|
88
|
+
_locToAddrs = std::move(rhs._locToAddrs);
|
|
89
89
|
}
|
|
90
90
|
return *this;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
virtual bool operator==(const ExeState &rhs) const;
|
|
94
93
|
|
|
95
|
-
|
|
94
|
+
protected:
|
|
95
|
+
VarToAddrs _varToAddrs{{0, getVirtualMemAddress(0)}}; ///< Map a variable (symbol) to its memory addresses
|
|
96
|
+
VarToAddrs _locToAddrs; ///< Map a memory address to its stored memory addresses
|
|
97
|
+
|
|
98
|
+
public:
|
|
99
|
+
|
|
100
|
+
/// get memory addresses of variable
|
|
101
|
+
virtual Addrs &getAddrs(u32_t id)
|
|
96
102
|
{
|
|
97
|
-
return
|
|
103
|
+
return _varToAddrs[id];
|
|
98
104
|
}
|
|
99
105
|
|
|
100
|
-
|
|
106
|
+
/// whether the variable is in varToAddrs table
|
|
107
|
+
inline virtual bool inVarToAddrsTable(u32_t id) const
|
|
101
108
|
{
|
|
102
|
-
return
|
|
109
|
+
return _varToAddrs.find(id) != _varToAddrs.end();
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/// whether the memory address stores memory addresses
|
|
113
|
+
inline virtual bool inLocToAddrsTable(u32_t id) const
|
|
114
|
+
{
|
|
115
|
+
return _locToAddrs.find(id) != _locToAddrs.end();
|
|
103
116
|
}
|
|
104
117
|
|
|
118
|
+
|
|
119
|
+
inline virtual const VarToAddrs &getVarToAddrs() const
|
|
120
|
+
{
|
|
121
|
+
return _varToAddrs;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
inline virtual const VarToAddrs &getLocToAddrs() const
|
|
125
|
+
{
|
|
126
|
+
return _locToAddrs;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
public:
|
|
105
130
|
/// Make all value join with the other
|
|
106
131
|
bool joinWith(const ExeState &other);
|
|
107
132
|
|
|
@@ -123,44 +148,22 @@ public:
|
|
|
123
148
|
return _kind;
|
|
124
149
|
}
|
|
125
150
|
|
|
126
|
-
inline virtual const VarToVAddrs &getVarToVAddrs() const
|
|
127
|
-
{
|
|
128
|
-
return _varToVAddrs;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
inline virtual const VarToVAddrs &getLocToVAddrs() const
|
|
132
|
-
{
|
|
133
|
-
return _locToVAddrs;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
inline virtual bool inVarToAddrsTable(u32_t id) const
|
|
137
|
-
{
|
|
138
|
-
return _varToVAddrs.find(id) != _varToVAddrs.end();
|
|
139
|
-
}
|
|
140
151
|
|
|
141
|
-
inline virtual bool inLocToAddrsTable(u32_t id) const
|
|
142
|
-
{
|
|
143
|
-
return _locToVAddrs.find(id) != _locToVAddrs.end();
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
virtual VAddrs &getVAddrs(u32_t id)
|
|
147
|
-
{
|
|
148
|
-
return _varToVAddrs[id];
|
|
149
|
-
}
|
|
150
152
|
|
|
151
|
-
|
|
153
|
+
public:
|
|
154
|
+
inline virtual void storeAddrs(u32_t addr, const Addrs &vaddrs)
|
|
152
155
|
{
|
|
153
156
|
assert(isVirtualMemAddress(addr) && "not virtual address?");
|
|
154
157
|
if(isNullPtr(addr)) return;
|
|
155
158
|
u32_t objId = getInternalID(addr);
|
|
156
|
-
|
|
159
|
+
_locToAddrs[objId] = vaddrs;
|
|
157
160
|
}
|
|
158
161
|
|
|
159
|
-
inline virtual
|
|
162
|
+
inline virtual Addrs &loadAddrs(u32_t addr)
|
|
160
163
|
{
|
|
161
164
|
assert(isVirtualMemAddress(addr) && "not virtual address?");
|
|
162
165
|
u32_t objId = getInternalID(addr);
|
|
163
|
-
return
|
|
166
|
+
return _locToAddrs[objId];
|
|
164
167
|
}
|
|
165
168
|
|
|
166
169
|
inline bool isNullPtr(u32_t addr)
|
|
@@ -168,13 +171,23 @@ public:
|
|
|
168
171
|
return getInternalID(addr) == 0;
|
|
169
172
|
}
|
|
170
173
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
+
public:
|
|
175
|
+
|
|
176
|
+
virtual bool operator==(const ExeState &rhs) const;
|
|
177
|
+
|
|
178
|
+
inline virtual bool operator!=(const ExeState &rhs) const
|
|
179
|
+
{
|
|
180
|
+
return !(*this == rhs);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
bool equals(const ExeState *other) const
|
|
184
|
+
{
|
|
185
|
+
return false;
|
|
186
|
+
}
|
|
174
187
|
|
|
175
188
|
protected:
|
|
176
189
|
|
|
177
|
-
static bool
|
|
190
|
+
static bool eqVarToAddrs(const VarToAddrs &lhs, const VarToAddrs &rhs)
|
|
178
191
|
{
|
|
179
192
|
if (lhs.size() != rhs.size()) return false;
|
|
180
193
|
for (const auto &item: lhs)
|
|
@@ -195,14 +208,14 @@ public:
|
|
|
195
208
|
virtual std::string varToAddrs(u32_t varId) const
|
|
196
209
|
{
|
|
197
210
|
std::stringstream exprName;
|
|
198
|
-
auto it =
|
|
199
|
-
if (it ==
|
|
211
|
+
auto it = _varToAddrs.find(varId);
|
|
212
|
+
if (it == _varToAddrs.end())
|
|
200
213
|
{
|
|
201
214
|
exprName << "Var not in varToAddrs!\n";
|
|
202
215
|
}
|
|
203
216
|
else
|
|
204
217
|
{
|
|
205
|
-
const
|
|
218
|
+
const Addrs &vaddrs = it->second;
|
|
206
219
|
if (vaddrs.size() == 1)
|
|
207
220
|
{
|
|
208
221
|
exprName << "addr: {" << std::dec << getInternalID(*vaddrs.begin()) << "}\n";
|
|
@@ -223,14 +236,14 @@ public:
|
|
|
223
236
|
virtual std::string locToAddrs(u32_t objId) const
|
|
224
237
|
{
|
|
225
238
|
std::stringstream exprName;
|
|
226
|
-
auto it =
|
|
227
|
-
if (it ==
|
|
239
|
+
auto it = _locToAddrs.find(objId);
|
|
240
|
+
if (it == _locToAddrs.end())
|
|
228
241
|
{
|
|
229
242
|
exprName << "Var not in varToAddrs!\n";
|
|
230
243
|
}
|
|
231
244
|
else
|
|
232
245
|
{
|
|
233
|
-
const
|
|
246
|
+
const Addrs &vaddrs = it->second;
|
|
234
247
|
if (vaddrs.size() == 1)
|
|
235
248
|
{
|
|
236
249
|
exprName << "addr: {" << std::dec << getInternalID(*vaddrs.begin()) << "}\n";
|