[mlpack-git] [mlpack] Log::Fatal should give a backtrace of some sort (#380)

Grzegorz Krajewski notifications at github.com
Thu Nov 19 06:01:24 EST 2015


What about simple backtrace from c lib _<execinfo.h>_ ?

(http://www.gnu.org/software/libc/manual/html_node/Backtraces.html)

I already done some simple implementation which gives me similar output like this:
```
[bt]: (1) ./test(crash+0x24) [0x8c50]
[bt]: (2) ./test(foo4+0x10) [0x8c70]
[bt]: (3) ./test(foo3+0x10) [0x8c8c]
[bt]: (4) ./test(foo2+0x10) [0x8ca8]
[bt]: (5) ./test(foo1+0x10) [0x8cc4]
[bt]: (6) ./test(main+0x74) [0x8d44]
[bt]: (7) /lib/libc.so.6(__libc_start_main+0xa8) [0x40032e44]
```
At the beginning _backtrace_ gives mangled strings, after demangling and using libSegFault.so You can get some nice tracing with files / line number and functions, but more information You can find here:

(https://help.github.com/articles/markdown-basics/)

And I'm not sure what about portability of those methods.

---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/380#issuecomment-158023424
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20151119/1353e704/attachment.html>


More information about the mlpack-git mailing list