boostorg / stacktrace

C++ library for storing and printing backtraces.
https://boost.org/libs/stacktrace
433 stars 74 forks source link

Does not show line number when link with boost_stacktrace_addr2line. #113

Closed Kidsunbo closed 1 month ago

Kidsunbo commented 3 years ago

Environment

Package Name/Version: boost/1.76.0 Operating System+version: Linux Ubuntu 20.04.3 LTS (in docker) Compiler+version: GCC 9 Docker image: ubuntu/latest

Description

I find it does not show the line number if I link with boost_stacktrace_addr2line, but if I link with boost_stacktrace_backtrace, the line number shows up. The stacktrace is always shown but the line number is only shown if I link with boost_stacktrace_backtrace rather than boost_stacktrace_addr2line which is different with what the document says.

The other linked libraries are always the same which are backtrace and dl, and the addr2line is at the path /usr/bin/addr2line.

I have tried to install boost with conan and apt respectively, and the result is the same. Did I misunderstand the document? And is it expected?

apolukhin commented 1 month ago

Was probably fixed in https://github.com/boostorg/stacktrace/commit/fbcd543b5180b8ee307fef6fbfc34aa372d330cf