<p>In <a href="https://github.com/mlpack/mlpack/pull/535#discussion_r54937149">src/mlpack/core/util/backtrace.cpp</a>:</p>
<pre style='color:#555'>> + stackStr += " recompile with: -g -rdynamic.\n";
> +
> + return stackStr;
> + }
> +
> + for(unsigned int i = 0; i < stack.size(); i++)
> + {
> + frame = stack[i];
> +
> + lineOss << frame.line;
> + it << i + 1;
> +
> + stackStr += "[bt]: (" + it.str() + ") "
> +         + frame.file + ":"
> +         + frame.function + ":"
> +         + lineOss.str() + "\n";
</pre>
<p>I think it might be useful to print <code>lineOss.str()</code> before <code>frame.function</code>; this is a bit closer to the output given by utilities like gdb and similar. So I guess instead of output like</p>
<pre><code>[bt]: a.cpp:A():10
</code></pre>
<p>I think that this would be better:</p>
<pre><code>[bt]: a.cpp:10: A()
</code></pre>
<p>(I think a space between the line number and the function would be helpful for readability too.)</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/pull/535/files#r54937149">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFK95ExvqdQqoCiDrdPLZx37Sqnz_ks5ppzucgaJpZM4Hm7uJ.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/mlpack/mlpack/pull/535/files#r54937149"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>