Jump to content
  • Advertisement
  • entries
  • comments
  • views

Debugging Epoch Programs

Sign in to follow this  


My recent adventures in self-hosting the 64-bit Epoch compiler have led me to a significant conclusion: it isnaEUR(TM)t worth trying to self-host a compiler when you canaEUR(TM)t debug the target language.

A much better use of my time would be to improve the languishing PDB generation experiment and get the code set up to actually emit usable debug symbols for Visual Studio and WinDbg.

It presently takes several minutes to build a candidate compiler; given that fact, it makes little sense to try and brute-force my way to correctness. Debuggers are valuable tools and shouldnaEUR(TM)t be left as afterthoughts in the development of what aims to be a production language.

So IaEUR(TM)m dusting off the code for PDB emission and working on a tiny shim DLL that will provide some hard-coded one-off features that might be needed in the course of getting the legacy 32-bit compiler to generate debug information about 64-bit executables.

One such thing that has come up is that, since vanilla Epoch lacks pointer arithmetic, it is hard to do serialization well. The shim DLL currently contains a single function, GetBufferPtr, which takes an input pointer and offset and returns the pointer adjusted by that offset. In other words, itaEUR(TM)s a glorified pointer-add.

This isnaEUR(TM)t really satisfying to me as a long-term way to write Epoch code, but IaEUR(TM)ve decided that debug information is more important than implementing 64-bit features, including self-hosting. As such, itaEUR(TM)ll have to suffice for a while.


Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!