Retrieving local variable names.

The code generator converts a local variable into FrameIndex. Is there anyway I can retrieve the symobl name of the local variable from FrameIndex?

Thanks,
Sanjiv

It's not currently available. LLVM would have to propagate debug information through all codegen passes but it doesn't do that yet.

Evan

Is this something that will happen in future? Or there is no plan for
it?

Thanks,
Ali

Is this something that will happen in future? Or there is no plan for
it?

I am not aware of any plan to add this. I suspect this won't happen until there is a major push to improve debugging support. If you are interested in this area, feel free to contribute! :slight_smile:

Evan

Is this something that will happen in future? Or there is no plan for
it?

Dan's work on MemoryOperands is a great step towards this. It doesn't associate a local variable with a frameindex per say, but each instruction that accesses the FI will have an associated memoperand that tells you (roughly) the llvm alloca that it corresponds to. From that you could jump up to debug info, etc.

-Chris

We certainly benefit from doing this, however,
1) I don't know where to start from.
2) At this time I think we can find other solutions for our problem, so
there is no justification for this effort; until we encounter another
problem :slight_smile:

Thanks.