JuliaHubOSS / llvm-cbe

resurrected LLVM "C Backend", with improvements
Other
838 stars 144 forks source link

Debugging: Use real names for structs and fields for data "at rest" #177

Open dpaoliello opened 1 year ago

dpaoliello commented 1 year ago

Currently debugging LLVM-CBE code is horrible. One issue is that we generate names for structs and their fields that don't correspond to the user's original source.

To improve this, we could generate structs based on debugging information and use these structs when storing data (i.e., for locals, parameters, fields in other names structs, etc.). To make code generation easier, any time we use a value that is a struct we can immediately cast it into the anonymous struct type (so that we can access the fields via their indexes).