[PATCH] [RFC] Use llvm-symbolizer to symbolize LLVM/Clang crash dumps

Alexey Samsonov vonosmas at gmail.com
Fri Oct 10 15:32:26 PDT 2014


SG, submitted in r219534. Feel free to replace this line with smth. like

#if defined(__linux__)
  // info->dlpi_name on Linux contains empty string for main executable.
  const char *name = data->first ? data->main_exec_name : info->dlpi_name;
#else
  const char *name = info->dlpi_name;
#endif

if you find it working better / more reliable on FreeBSD systems. I'd also
really appreciate if you could test this change by introducing a crash in
Clang
and verifying that symbolization works as expected. Thanks!

On Fri, Oct 10, 2014 at 3:27 PM, Ed Maste <emaste at freebsd.org> wrote:

> On 10 October 2014 18:22, Ed Maste <emaste at freebsd.org> wrote:
> >> I'd prefer to leave this condition as is, and don't special-case on it.
> We already have main executable at this point, why not use it?
> > On FreeBSD the main executable path is returned by the first callback
> from dl_iterate_phdr, rather than a blank string as on Linux. This is true
> in practice at least, that it's first is not explicitly guaranteed.
> ...
> That said, it seems reasonable to me to get the change in as-is now,
> and I'm happy to test out various aspects and submit a further patch
> later.
>



-- 
Alexey Samsonov
vonosmas at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141010/8c2d89d1/attachment.html>


More information about the llvm-commits mailing list