Ramkumar Ramachandra via llvm-dev
2015-Aug-27 15:41 UTC
[llvm-dev] Query about interpreting native assembly
Hi, In attempting to fix a bug, I'm stepping through it using lldb, and recording the assembly output/ register values. The main problem at hand is to figure out where I am with respect to the source program. I tried taking the ahead-of-time .ll dump from LLVM and running it through llc, but the assembly seems to be completely different. Why is that? In the past, I used a simple pass to instrument the code to print out every LLVM instruction before executing it. Then, I could easily correlate the assembly directly with the last few LLVM instructions before the crash. However, the bug at hand is sporadic and doesn't show itself when the instruction-printer is turned on. I'd appreciate any pointers on how to proceed. Injecting metadata to get DWARF information is an option, but I suspect it's a lot of work. Thanks. Ram