[M3devel] LLVM backend?

Jay K jay.krell at cornell.edu
Sun Mar 31 01:38:59 CET 2013


To be clear, changing cm3cg output dwarf is, well, the support is already there, cm3cg -gdwarf or whatever.



That isn't the right thing to do though. The right thing is just cm3cg -g or -g2 or whatnot, and let the target-specific default be used. For example, on Darwin it is probably "xcoff", on Cygwin it is probably unfortunately stabs.


The key is that we don't describe types in the backend.
Our structs are just records with size and no fields, and member/field accesses are done by adding an offset and casting. I started fixing this. It is farther along in the C backend though.


The solution isn't to write any code that knows about any debug format.


 - Jay


From: dragisha at m3w.org
Date: Sat, 30 Mar 2013 23:30:53 +0100
To: rodney_bates at lcwb.coop
CC: m3devel at elegosoft.com
Subject: Re: [M3devel] LLVM backend?

I've also skimmed through DWARF last year or something like that. _It is_ more complete than stabs and while (esp m3gdb) stabs are mostly hiding and guarding data from compiler through optimizer and linker to debugger, DWARF is made to enable modification of debug info as code is modified (esp while being optimized). There is no order of magnitude big enough to express its advantage over hacked-in-stabs.

--Dragiša Durićdragisha at m3w.org



On Mar 28, 2013, at 4:23 PM, Rodney M. Bates wrote:LLVM has a lot of already provided support for dwarf debug info, keeping it together with code,
and helping to transform it in parallel with code, when optimizations, etc., are done.
Meanwhile, dwarf itself is vastly more complete and appears to me, from superficial study,
to be capable of representing all, or certainly most, of what is needed for good Modula-3 debugging.
For these two reasons, I think LLVM plus dwarf present by far the best method to support
a nice language-specific debugging experience, while leaving massive kludges behind.
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20130331/b1565454/attachment-0002.html>


More information about the M3devel mailing list