Re: [Valgrind-users] How to include the Valgrind stack traces in a stand-alone debug version?

2021-05-27 Thread John Reiser
For the example given, the backtrace command of gdb-8.3 already displays 80% of the requested information for code compiled by g++-9.3.1 using -g. The request: > If compiled with -g, the debug output will display > (1) C/C++ names down into the standard library > (2) source code names and

Re: [Valgrind-users] How to include the Valgrind stack traces in a stand-alone debug version?

2021-05-26 Thread Martin Licht via Valgrind-users
Addressing the first point: what Valgrind's tracer does better than others is fetching more source code information and semantics. This can shown immediately with the following example: ``` #include #include inline void bar() { abort(); } template inline void foo(T) { bar(); } int

Re: [Valgrind-users] How to include the Valgrind stack traces in a stand-alone debug version?

2021-05-24 Thread John Reiser
On 5/24/21, Martin Licht via Valgrind-users wrote: I think the Valgrind stack tracer is pretty great and I would like to use it as a substitute for `backtrace` in my C++ debug builds. It would help to give an explicit list of why valgrind's backtrace() is "pretty great" in contrast to

Re: [Valgrind-users] How to include the Valgrind stack traces in a stand-alone debug version?

2021-05-24 Thread Philippe Waroquiers
On Mon, 2021-05-24 at 10:31 -0700, Martin Licht via Valgrind-users wrote: > Hello, > > I think the Valgrind stack tracer is pretty great and I would like to use it > as a substitute for `backtrace` in my C++ debug builds. > > A blog post by Nicholas Nethercote (Using Valgrind to get stack

[Valgrind-users] How to include the Valgrind stack traces in a stand-alone debug version?

2021-05-24 Thread Martin Licht via Valgrind-users
Hello, I think the Valgrind stack tracer is pretty great and I would like to use it as a substitute for `backtrace` in my C++ debug builds. A blog post by Nicholas Nethercote (Using Valgrind to get stack traces) describes a similar idea: