Exception Hierarchy [WAS: Re: Top 5]

Sean Kelly sean at invisibleduck.org
Sat Oct 18 09:30:17 PDT 2008


Frits van Bommel wrote:
> Brad Roberts wrote:
>> For anything running on top of glibc (ie, every linux distribution) 
>> it's fairly trivial via backtrace() and backtrace_symbols() found in 
>> execinfo.h.  The symbols are the mangled form, but that's a simple 
>> matter of code to translate back to more meaningful names.  An 
>> incomplete version of that is available in phobos already (and 
>> probably somewhere in Tango too) -- and it should really be in the 
>> core runtime, probably.
>>
>> Given the 2 or 3 implementations floating around, I imagine it 
>> wouldn't be hard to integrate for both windows and linux.
> 
> Hey, those are a handy pair of functions.
> I just implemented a backtrace handler for Tango using those.
> 
> The source is attached.

Nice work!  I think this would be a good thing to bundle with Tango and 
druntime.  I haven't looked at the source yet, but do you have any 
objection to it being distributed under the Tango or druntime licenses?


Sean

P.S. Anyone interested in making a Win32 backtrace package? :-)



More information about the Digitalmars-d mailing list