I have been facing a few problems getting names of variables from the bitcode. The bitcode does contain debug metadata. The first problem is regarding
memtmp' variables (apparently, the original variable name is no longer present in the bitcode). The other two problems concern OpenMP. In one case, the instruction is not named and hence establishing a connection to the debug metadata does not seem possible. In the other case, I am noticing some extra fields present in the omp_data_s’ structure (these fields are not present in the source code) and hence the `alloca’ does not match the metadata definition.
Here are the details:
Does lldb have similar goals? If yes, which files should I be looking at?
Any pointers are appreciated!
If debug information isn't there which you think should be, it's
probably a frontend bug (in dragonegg, assuming you're using it).
Hi Ashay, which compiler are you using to produce the bitcode?
You may try clang. It generates the debugging information you want.
Thanks, I thought about clang but I need to work with Fortran programs too. Hence using dragonegg.
Thanks, I thought about clang but I need to work with Fortran programs too.
Hence using dragonegg.
the debug info generated by dragonegg is pretty rotten. Between gcc-4.2 and
gcc-4.5, internal changes in gcc meant that the technique that llvm-gcc used
to generate debug info for local variables (llvm-gcc was based on gcc-4.2)
no longer worked with gcc-4.5 (dragonegg was created by porting llvm-gcc to
gcc-4.5). I never found time to fix this, but of course it needs to be fixed.
Please open a bug report about it so that I don't forget.