digitalmars.D - Tango backtrace hack?
- Robert Fraser (4/4) Mar 28 2009 Has anyone been able to get the backtrace hack working with the newest
- Robert Fraser (2/7) Mar 28 2009 ... On Windows + DMD 1.041?
- Robert Fraser (7/15) Mar 30 2009 In particular, I've narrowed the problem down to CreateProcessW, which
- Sean Kelly (4/6) Mar 30 2009 What is the state of backtrace support, anyway? I know the flectioned
- Robert Fraser (6/13) Apr 01 2009 This is the one I was trying to get to work:
- Fawzi Mohamed (21/25) Apr 01 2009 The svn version of tango has some backtracing ability:
- grauzone (4/6) Apr 01 2009 You can get the mangled function name in a very simple way: just open
- Fawzi Mohamed (6/13) Apr 01 2009 patch are welcome ;)
Has anyone been able to get the backtrace hack working with the newest Tango? Thanks, Robert
Mar 28 2009
Robert Fraser wrote:Has anyone been able to get the backtrace hack working with the newest Tango? Thanks, Robert... On Windows + DMD 1.041?
Mar 28 2009
Robert Fraser wrote:Robert Fraser wrote:In particular, I've narrowed the problem down to CreateProcessW, which is sending "The parameter is incorrect." This is rendered as: tango.sys.Process.ProcessCreateException: Could not create process for C:/d/dmd/bin/dmc.exe : The parameter is incorrect. Any Tango lovers know what the issue might be? (I know I should have posted this in learn, sorry!)Has anyone been able to get the backtrace hack working with the newest Tango? Thanks, Robert... On Windows + DMD 1.041?
Mar 30 2009
Robert Fraser wrote:Has anyone been able to get the backtrace hack working with the newest Tango?What is the state of backtrace support, anyway? I know the flectioned plugin is outdated and broken now. I don't suppose someone could enumerate and link to the others?
Mar 30 2009
Sean Kelly wrote:Robert Fraser wrote:This is the one I was trying to get to work: http://petermodzelewski.blogspot.com/2008/01/installing-tango-backtrace-hack-on.html I could just do it manually, but that seems like a lot of work ;-P. It seems to be in the proposed patches of the tango svn, but hasn't been applied yet.Has anyone been able to get the backtrace hack working with the newest Tango?What is the state of backtrace support, anyway? I know the flectioned plugin is outdated and broken now. I don't suppose someone could enumerate and link to the others?
Apr 01 2009
On 2009-03-28 23:10:44 +0100, Robert Fraser <fraserofthenight gmail.com> said:Has anyone been able to get the backtrace hack working with the newest Tango? Thanks, RobertThe 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
Apr 01 2009
- linux: backtrace, get just the addresses, those can be resolved through addr2line to have function and file/line numberYou can get the mangled function name in a very simple way: just open /proc/self/exe and read the .symtab and .strtab sections. That's not perfect, but better than nothing, and it's probably much simpler than to parse the debugging infos.
Apr 01 2009
On 2009-04-01 19:16:20 +0200, grauzone <none example.net> said:patch are welcome ;) at the moment I use dladdr which on mac gives info for both static and dynamically loaded objects, but on linux gives just the offset to the beginning of the static exe image. Fawzi- linux: backtrace, get just the addresses, those can be resolved through addr2line to have function and file/line numberYou can get the mangled function name in a very simple way: just open /proc/self/exe and read the .symtab and .strtab sections. That's not perfect, but better than nothing, and it's probably much simpler than to parse the debugging infos.
Apr 01 2009