Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stacktrace with backtrace to display files and lines #2298

Merged

Conversation

guilhermelawless
Copy link
Contributor

Detailed information in https://www.boost.org/doc/libs/develop/doc/html/stacktrace/configuration_and_build.html

The BOOST_STACKTRACE_USE_BACKTRACE option was the only reliable one here, but should be tested across a variety of configurations if possible. There is a callout for clang but setting a custom path for the file is not supported here - haven't tested with clang.

  • Adds NANO_STACKTRACE_BACKTRACE cmake option. If enabled, will link against libbacktrace and define the BOOST_STACKTRACE_USE_BACKTRACE macro where necessary, except on Windows which already has good default stacktrace
  • Adds --debug_stacktrace CLI option to easily see what will be the usual stacktrace

Example output:

nano_node --debug_stacktrace
 0# main at /home/glawless/nano_ws/nano-node/nano/nano_node/entry.cpp:1087
 1# __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
 2# _start in ./nano_node

@guilhermelawless guilhermelawless added documentation This item indicates the need for or supplies updated or expanded documentation quality improvements This item indicates the need for or supplies changes that improve maintainability tool Introduces or updates a tool or command labels Sep 10, 2019
@guilhermelawless guilhermelawless added this to the V20.0 milestone Sep 10, 2019
@guilhermelawless guilhermelawless self-assigned this Sep 10, 2019
Copy link
Contributor

@cryptocode cryptocode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On macOS/clang/libstd++, I did get the issue of not finding backtrace.h mentioned in https://www.boost.org/doc/libs/develop/doc/html/stacktrace/configuration_and_build.html#stacktrace.configuration_and_build.f3

But I think that's fine since this is opt-in and there are known workarounds.

@guilhermelawless guilhermelawless merged commit b33c483 into nanocurrency:master Sep 17, 2019
@guilhermelawless guilhermelawless deleted the stacktrace-detail branch September 17, 2019 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This item indicates the need for or supplies updated or expanded documentation quality improvements This item indicates the need for or supplies changes that improve maintainability tool Introduces or updates a tool or command
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants