Polygeist icon indicating copy to clipboard operation
Polygeist copied to clipboard

Debug information in MLIR output from cgeist

Open argentite opened this issue 1 year ago • 2 comments

We are trying to use cgeist -S to convert C/C++ source code to MLIR for further processing. However the generated MLIR output does not have any source line information. We tried -g, --debugify-level=locations and --debugify-level=location+variables but that does not seem to add anything. Generated binaries with cgeist also does not seem to include any debug information.

Is it possible to get file and/or line number information of the C/C++ source to aid in debugging?

argentite avatar Aug 22 '24 05:08 argentite

https://github.com/llvm/Polygeist/pull/426 I think this should fix it and you should be able to use --print-debug-info to get locations in the MLIR output, but I will wait for the tests to complete before merging.

ivanradanov avatar Aug 22 '24 06:08 ivanradanov

Yeah, this is exactly what we were looking for. Thank you so much.

argentite avatar Aug 22 '24 08:08 argentite