On Thu, 2010-07-01 at 01:11 -0400, Daniel Herring wrote:
On Thu, 1 Jul 2010, Stelian Ionescu wrote:
Questions:
- Am I doing it all wrong or can one do like this?
- Is there a smart way to use the .so file to get the correct name of
functions?
That library seems to be C++ or a C library compiled with the C++ compiler and it doesn't export functions with C linkage, so you need to make one yourself
- You can use nm. Even better are object files with dwarf2 debug info...
They tell you just about everything imaginable. Much better than grovelling sources or headers. http://reality.sgiweb.org/davea/dwarf.html
Groveling the headers serves two purposes: dealing with CPP macros, i.e. finding the value of constant macros or wrapping in a function those that expand to code; and finding the layout and size of structs Is DWARF information of any use in the aforementioned cases ?