title: Debugging LLVM IR
body: <p>I've built an LLVM-targetting frontend which produces some IR. Subsequently and entirely expectedly, the IR output is incorrect in some cases (as in, it appears correct, but the resulting program crashes when executed). However, I haven't found many useful tools to deal with this. </p>
  
  <p>I have tried using lli, but the error message output is spectacularly unhelpful (when you would assume that an interpreter could give very precise error details). </p>
  
  <p>I looked into converting the IR to C code, and then debugging that with Visual Studio, but it seems this functionality was removed from LLVM. </p>
  
  <p>I also looked into dealing with GDB. However, the DWARF debug information format is quite specific to a few existing languages it seems, and in addition, the source that I am translating with my frontend is correct, it's the produced IR which is wrong, so debug symbols for the original source wouldn't be too helpful- for example, I'd need to see the values of a bunch of intermediate register values that don't correspond to any source variable, or breakpoint in compiler-generated functions.</p>
  
  <p>What tools and techniques exist to debug LLVM IR output?</p>