For the local variables:
there's probably 3 steps:
first, the compiler will need to save information about which variable is associated with each register. Currently this is thrown away after code generation, I think.
next, the debugger will need to do some analysis to figure out which variables can actually be determined at the current instruction. The easier way to do this is to look at the register allocator's result. It knows which variables are mapped to each register. But, this will miss some cases where a variable is considered "dead" by the register allocator (it's value is no longer needed), but the register isn't reused, and you can still determine the variable
At each instruction, the OpenGOAL debugger should know which variable is in each register and stack slot, its name, and its type.