<p>Yeah,  I found some documentation on libunwind and could implement a simple code to backtrace inside a single file within different functions. Have to try on different classes with functions spread over multiple files. <br>
I still need some help on the Log::Fatal method and how it exits the program. Maybe the backtracing fucntion can be called just before the exit call to see the whole stack.</p>

<p>Link to implementation using libunwind : <br>
<a href="http://pastebin.com/BHgippet">http://pastebin.com/BHgippet</a></p>

<p>Someone who worked on the mlpack / PrefferedStreamOutput file before can try to implement it.. </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/issues/380#issuecomment-74085796">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFD_zgq4RD_tX4xisVGBp6r3UYQ3Xks5nrLmCgaJpZM4DRaYY.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/issues/380#issuecomment-74085796"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>