<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'>&gt; +    stackStr += &quot; recompile with: -g -rdynamic.\n&quot;;
&gt; +    
&gt; +    return stackStr;
&gt; +  }
&gt; +  
&gt; +  for(unsigned int i = 0; i &lt; stack.size(); i++)
&gt; +  {
&gt; +    frame = stack[i];
&gt; +    
&gt; +    lineOss &lt;&lt; frame.line;
&gt; +    it &lt;&lt; i + 1;
&gt; +    
&gt; +      stackStr += &quot;[bt]: (&quot; + it.str() + &quot;) &quot;
&gt; +               + frame.file + &quot;:&quot;
&gt; +               + frame.function + &quot;:&quot;
&gt; +               + lineOss.str() + &quot;\n&quot;;
</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;">&mdash;<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>