The binary code that we are unwinding contains a lot of code
that is runtime generated. Reading the libunwind manual, I conclude that there’s
two ways to deal with this.
- Register all runtime generated
code using the libunwind-dynamic stuff.
- Provide accessor functions that
can deal with the dynamic code.
Considering that we might have hundreds of thousands of
small functions generated, and that all information about the functions can be derived
from already existing structures given the instruction pointer, the second
approach seems much more appealing. It does however bring a few questions.
- It seems that the only way to
use the accessors is to register them with unw_init_remote. Will that incur
an unnecessary overhead? Or is perhaps the overhead using remote in fact the
use of a function table?
- Using the libunwind-dynamic,
there is a way to register things so that libunwind is globally aware of
them. Would it be possible to do the same thing for an accessors?
Regards,
Thomas Hallgren