This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
why no stacktrace?
- To: gcc at gcc dot gnu dot org
- Subject: why no stacktrace?
- From: Ulrich Lauther <ulrich dot lauther at mchp dot siemens dot de>
- Date: Tue, 4 Jan 2000 13:46:21 +0100 (MET)
- Reply-To: Ulrich dot Lauther at mchp dot siemens dot de
I am a rather old programmer starting with Algol in the 60ies, then Fortran,
Pascal ...
All these languages, i.e., its compilers, (even Fortran) provided a stack
trace when a program crashed. Not so gcc/g++. Why not?
Yes, I know, there are debuggers these days, but it is very convenient
to have a stack trace when a program crashes at a customer to get a rough
first idea about the problem.
I wrote my own stack trace procedure based on __builtin_return_address()
and using the addr2line utility from binutils (which I wrote a few years ago)
to translate addresses into line numbers.
However, to have a builtin stack trace, called on unnormal termination would be
much better and I guess it would be quite easy to implement by someone who knows
the inner workings of the compiler.
--
-lauther
----------------------------------------------------------------------------
Ulrich Lauther ph: +49 89 636 48834 fx: ... 636 42284
Siemens ZT SE 4 Internet: Ulrich.Lauther@mchp.siemens.de