On Tue, May 21, 2013 at 9:52 AM, Alexander Monakov <amona...@ispras.ru> wrote: > > 1. The documentation does not say whether reusing "state" objects is allowed. > For instance, I'm using backtrace_simple, and then in the callback I'm > invoking dladdr and backtrace_pcinfo to gather file-line info if available. > Looks like at the moment it's fine, as no frame-specific information is stored > there.
Yes, you can reuse backtrace_state objects. > 2. The reason I'm invoking dladdr instead of backtrace_syminfo is the need to > obtain the name of the module containing the symbol. Is that intended? > (IOW, would be nice if libbacktrace syminfo callback provided name and base > address of the loaded module as well) I'm fine with changing libbacktrace_syminfo so that it passes the module name and the base address to the callback. > 3. In libbacktrace/elf.c, elf_syminfo() does not seem to walk the chain of > elf_syminfo_data (i.e. does not use edata->next). Is that a bug? Hmmm, yes, that does look like a bug. Whoops. Ian