Commit 22f89a88 authored by Micha Müller's avatar Micha Müller
Browse files

Fix bug that prevented Cali service from resolving symbols

parent 45380821
......@@ -115,7 +115,7 @@ class DcdbPusher {
/* make it sortable for faster lookups */
bool operator<(const func_symbol& rhs) const {
return start_addr < rhs.start_addr;
return end_addr < rhs.end_addr;
}
};
......@@ -130,7 +130,7 @@ class DcdbPusher {
/* make it sortable for faster lookups */
bool operator<(const addr_range& rhs) const {
return start_addr < rhs.start_addr;
return end_addr < rhs.end_addr;
}
};
......@@ -330,6 +330,7 @@ private:
// symdat.end_addr,
// sym.st_size);
if (!dest.insert(symdat).second) {
//TODO check again here
//Log(1).stream() << chn->name() << ": DcdbPusher: Could not insert symbol!" << std::endl;
}
} else {
......@@ -767,7 +768,7 @@ private:
uintptr_t pc = sampler_pc_entry.value().to_uint();
addr_range a_tmp;
a_tmp.start_addr = pc;
a_tmp.end_addr = pc;
if (!symbol_lock.try_lock_shared()) {
++snapshots_failed;
......@@ -778,7 +779,7 @@ private:
if (a_it != addr_data.end() && pc >= a_it->start_addr && pc <= a_it->end_addr) {
//we found associated address range
func_symbol f_tmp;
f_tmp.start_addr = pc;
f_tmp.end_addr = pc;
auto f_it = a_it->symbols.lower_bound(f_tmp);
if (f_it != a_it->symbols.end() && pc >= f_it->start_addr && pc <= f_it->end_addr) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment