I wrote an LLVM transformation that basically replaces mallocs with the kind of protected mallocs and some other things.
I use clang (or llvm-gcc) to compile from a file to get a bitcode file (using the -emit-llvm option) that contains debugging information. They also contain method names, line numbers, etc.
Subsequently, I use the option to work with this bitcode file. The result is a tool bit code file containing all the relevant debugging information.
In the third and final step, since we need some runtime libraries, we link the bitcode to some other bitcode files using llvm-gcc to get the final binary.
I canβt debug this binary, because it does not contain debugging information, although all related bitcode files contained them. The only thing gdb can tell me is a function in which we are not line numbers, etc ...
I would be grateful for any tips.
debugging llvm
Kevin streit
source share