> Ah, good catch! That's a bit of a bummer though, since the nice thing
> about execvp() is that it searches the path for the executable, so
> it'll work even if the user has addr2line installed somewhere else
> than /usr/bin. For execve(), one needs to provide an absolute path.

Yes, I know. Sorry :)

> One solution could be to search the PATH for addr2line during library
> initialization (where we don't need to be async-signal-safe), and then
> store it somewhere and use it in show_backtrace().

That's one way. Another way is just to store a copy of the PATH during 
initialization, and only search addr2line when really needed (which can be done 
with a static buffer and a series of call to execve(), can't it?)

FX

Reply via email to