When working on my language I've been frustrated b...
# devlog-together
j
When working on my language I've been frustrated by the lack of symbols and extra information for my JIT compiled code. There is a way to get this kind of information, but it involves building an elf binary in memory. Way too much overhead for this point in my development. So I started building my own debugger frontend to lldb. Not much to show right now. But the idea is to specifically tailor it to my language. So you'll get a compiler explorer like experience, but also be able to view the stack and heap and all of that live. See the language level values stored in there. The fun part to for me was how to convey the information I need to the debugger. The answer came from the standard JIT interface. How do you tell your debugger things? You make a function that the debugger has a breakpoint in. The function does nothing in the body. You just pass some args that tells the debugger where in memory to get the information it needs. Super clever. So now I'm working on passing all my compiler metadata to the debugger frontend so it can know how to render things intelligently.