exception backtraces

5 views
Skip to first unread message

srepmub

unread,
Jun 4, 2011, 12:47:10 PM6/4/11
to shedskin-discuss
hi guys,

currently, there are no backtraces for exceptions in shedskin.. after
googling a bit, I found this nice code snippet, that allows one to
print a useful C++-demangled backtrace at any moment:

https://idlebox.net/2008/0901-stacktrace-demangled/

licensed under the WTFPL.. :-)

so I used this in the constructor of BaseException, and added a -x
command-line option to shedskin to enable it. it works best if you
also compile with -O0 (or perhaps -fno-inline?), or inlined functions
will disappear from the trace.

this is certainly not ideal (yet), but I guess it's better than
nothing.. I'd be very interested in possible improvements.

thanks,
mark.

srepmub

unread,
Jun 4, 2011, 12:54:49 PM6/4/11
to shedskin-discuss
hm, this one may be useful to add filenames and line numbers:

http://cairo.sourcearchive.com/documentation/1.9.4/backtrace-symbols_8c-source.html
Reply all
Reply to author
Forward
0 new messages