This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

why no stacktrace?


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]