Debugging in Clasp and Cleavir

Christian Schafmeister chris.schaf at verizon.net
Wed Jun 24 04:12:56 UTC 2015


Hey folks,

As some of you know, I’m incorporating a new compiler into Clasp.  It’s called Cleavir and it is being written by Robert Strandh, a brilliant computer science professor at the University of Bordeaux .  Robert’s working at his own pace and he’s got a lot of irons in the fire just like I do. He’s working on type inference for Cleavir and on source code tracking.

I need these things to make Cleavir/Clasp generate fast code and to enable debugging.

The LLVM library that Clasp is built on provides an API to add DWARF debugging code and I’ve exposed it and used it in Clasp’s bootstrapping compiler.  But I need Robert to add support for source code tracking to Cleavir before I can hook it up in Clasp.
Once it’s hooked in then you could debug Clasp generated code alongside C++ code using the gdb or lldb debuggers.

What I don’t have is any way to read DWARF debugging information.  I’ve looked at the format and it looks pretty complicated but ultimately I’d like Clasp to read the DWARF data from executables and give backtraces and access to lexical/dynamic variables within Clasp.

Are there any volunteers to learn how to read DWARF debugging information or use libdwarf or something like it to read DWARF?

Best,

.Chris.







More information about the clasp-devel mailing list