-
David Johnson authored
dwdebug/ now supports symbol location resolution in frames on a call stack. Only the necessary junk for location resolution is in dwdebug; all the rest of the unwinding logic is in target/. dwdebug/ only knows about a "current frame" and the ability to use symbol info from other frames. It assumes the interface in struct location_ops. I added CFI register rule evalution, improved CFI parsing, etc. (I had first written it with more stack context awareness in dwdebug, but this got icky, so I rewrote it so dwdebug did not need to know.) So, of course, all the target/ location resolution/loading APIs change, because the core resolution/loading functions must be able to load not only in frame 0, but in frame N. Anyway, the result is an unwinding API that works (see tools/backtrace.c). This also enables function argument value loading for C++ programs compiled in recent gccs (which try to use the CFI cfa value as the frame_base pseudo register, in my limited testing). C++ support was therefore of limited utility until this commit.
fe53f004