Since this is now an intended performance optimization (unwind exactly
N frames) rather than a rough safety tripwire, make sure the number of
frames returned is exact.
#endif
}
- // e.g. gmon callgraphs only requires maxframes=1 (caller ID only)
+ this->last_us.sp = sp;
+ this->last_us.addrs.push_back(pc);
+
+ /* e.g. gmon callgraphs only requires maxframes=1
+ (initial pc + one frame for caller ID only) */
if (this->last_us.addrs.size() > this->maxframes)
{
- /* XXX very rarely, the unwinder can loop infinitely; worth investigating? */
+ /* XXX without maxframes, very rarely, the unwinder can loop
+ infinitely; worth investigating? */
return DWARF_CB_ABORT;
}
-
- this->last_us.sp = sp;
- this->last_us.addrs.push_back(pc);
return DWARF_CB_OK;
}