<div dir="ltr">SG, submitted in r219534. Feel free to replace this line with smth. like<div><br></div><div><div>#if defined(__linux__)</div><div> // info->dlpi_name on Linux contains empty string for main executable.</div><div> const char *name = data->first ? data->main_exec_name : info->dlpi_name;</div><div>#else</div><div> const char *name = info->dlpi_name;</div><div>#endif</div><div><br></div><div>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</div></div><div>and verifying that symbolization works as expected. Thanks!</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 10, 2014 at 3:27 PM, Ed Maste <span dir="ltr"><<a href="mailto:emaste@freebsd.org" target="_blank">emaste@freebsd.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 10 October 2014 18:22, Ed Maste <<a href="mailto:emaste@freebsd.org">emaste@freebsd.org</a>> wrote:<br>
>> 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?<br>
> 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.<br>
</span>...<br>
That said, it seems reasonable to me to get the change in as-is now,<br>
and I'm happy to test out various aspects and submit a further patch<br>
later.<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div>
</div>