[mlpack-git] [mlpack] Add mlpack::backtrace utility. (#535)
Ryan Curtin
notifications at github.com
Thu Mar 3 14:50:52 EST 2016
> + 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";
I think it might be useful to print `lineOss.str()` before `frame.function`; this is a bit closer to the output given by utilities like gdb and similar. So I guess instead of output like
```
[bt]: a.cpp:A():10
```
I think that this would be better:
```
[bt]: a.cpp:10: A()
```
(I think a space between the line number and the function would be helpful for readability too.)
---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/535/files#r54937149
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160303/0a1fa5f9/attachment.html>
More information about the mlpack-git
mailing list