Hello! Want to have a runtime stacktrace like in a java environment. Why will dladdr get an incorrect dli_fname, when I execute a standalone (without shared object) program? http://bachi.te-clan.ch/freebsd/i386-freebsd-backtrace.c http://bachi.te-clan.ch/freebsd/i386-freebsd-backtrace.result
When I create a shared object and link it with a executable, all functions in the shared object will be resolved, but all other functions will get an incorrect result. http://bachi.te-clan.ch/freebsd/i386-freebsd-backtrace-lib.c http://bachi.te-clan.ch/freebsd/i386-freebsd-backtrace-load.c http://bachi.te-clan.ch/freebsd/i386-freebsd-backtrace-lib.result In solaris also standalone programs will get correct dli_fname... http://bachi.te-clan.ch/freebsd/sparc-solaris-backtrace.c http://bachi.te-clan.ch/freebsd/sparc-solaris-backtrace.result I think the whole dynamic linking functions are buggy. dlsym will also not work. http://bachi.te-clan.ch/freebsd/i386-freebsd-dlsym.c http://bachi.te-clan.ch/freebsd/i386-freebsd-dlsym.result Is this a gap and will be implemented/fixed? Are there other functions to translate addresses to symbols on runtime? greets Andreas _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

