With the current API, it seems like the only way to map return addresses to symbols is to do it during iteration (unw_get_proc_info(), which takes a cursor.) This is awkward for things like profilers, where you want to quickly capture a bunch of stack traces (probably during a signal handler), and then analyze them later in aggregate. You might, for example, want to eliminate duplicate PCs before looking up symbols. Or only look up symbols for a subset of the stack samples (perhaps you're keeping a circular buffer of samples and only analyzing samples preceding events of interest.)
How difficult would it be to support address -> symbol lookup without a cursor? (Or is it there, and I'm missing it?) Right now, I'm using dladdr(), which requires linking in a way that I can't really do. And I don't really want to popen addr2line. _______________________________________________ Libunwind-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/libunwind-devel
