Hi all, This series creates two new helper APIs: 'module' and 'stack'. It applies on top of my outstanding patches; pull from repo.or.cz.
The 'module' API provides the ability to perform dynamic library loading and symbol lookup therein. The 'stack' API provides the ability to obtain backtraces of the C stack. It is used to register a SIGSEGV handler to provide a stack dump on crashs. The command module is updated to provide a 'stack' command that allows scripts to see the C stack too. It's also fun to run 'stack fault' and receive exactly what you requested. Unfortunately, the current implementation falls short of a simple post-processing script that uses 'addr2line'; however, I have looked at that utility's source code. It should be possible to use libbfd (or libelf, or even image.[ch]) to parse our own symbol table and improve the stack trace output considerably. This could be done such that the best available method will be detected and used automatically, with a configure option to select a specific implementation (i.e. to limit dependencies for a binary package releases). I expect these patches are non-portable at present, but they can be improved to support different platforms with relative ease. The same tricks to acheive this goal will be required to provide selectable Linux implementations (as suggested above). Cheers, Zach _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development