> Is it true that backtrace_symbols returns symbols only for functions
> exported by shared libraries?
It appears that way. At least, I could not make the following program
work.
#include <stdio.h>
void foo(){
void *buf[10];
int count = backtrace(buf,10);
char **s = backtrace_symbols(buf,count);
int i;
for(i=0;i<count;i++)
puts(s[i]);
}
void bar(){
foo();
}
int main()
{
bar();
}
it would not even work with --export-dynamic, i.e. when the symbols
were exported from the executable.
> Is there similar functionality which could be used for other
> functions for which debugging information exists but whch aren't
> exportet?
I guess you can extract that function from binutils. When you are
done, please make sure to submit it for inclusion into glibc :-)
Regards,
Martin