Tango backtrace hack?

Fawzi Mohamed fmohamed at mac.com
Wed Apr 1 09:08:39 PDT 2009


On 2009-03-28 23:10:44 +0100, Robert Fraser <fraserofthenight at gmail.com> said:

> Has anyone been able to get the backtrace hack working with the newest Tango?
> 
> Thanks,
> Robert

The svn version of tango has some backtracing ability:
- windows: backtrace non optimized executables compiled with -g to get 
function names and line numbers (thanks to h3)
- mac: backtrace executables, get nice names, but no line numbers
- linux: backtrace, get just the addresses, those can be resolved 
through addr2line to have function and file/line number

The goal is to make it as memory friendly as possible (i.e. without 
heap allocations, but also with limited stack usage, to use that in 
fibers stacks that might be small), thus it is different from how it 
used to be. This is especially true for the demangler (based on Hxal's 
jive demangler).

Unfortunately the main obstacles toward having a good stacktrace on 
linux are license problems: the main utilities/libraries are GPL, and 
using them would make the whole tango GPL.

There are ways to avoid these problems, but require more coding, if 
anybody wants to take a stab at it he is welcome, there is some 
discussion in
	http://www.dsource.org/projects/tango/ticket/1368

The support is still partial, but will hopefully improve

Fawzi




More information about the Digitalmars-d mailing list