[LLVMdev] Debugging LLVM IR with GDB

Duncan Sands baldrick at free.fr
Thu Oct 18 00:31:48 PDT 2012


Hi Krzysztof,

On 18/10/12 05:31, Krzysztof Parzyszek wrote:
> On 10/17/2012 9:04 AM, Duncan Sands wrote:
>> Unfortunately I have no idea how to implement this in a reasonable way.
>
> It should be possible to precompute the layout of the .ll file from the IR
> itself and then add self-annotations.  It may require a special form of dumping
> the IR into a .ll file to make sure that empty lines, etc. are properly
> synchronized with the annotations.  Wouldn't this solve the problem (reasonably)?

it might be simpler to teach llvm-as how to add debug info to each instruction
as it reads it in.  After all, it naturally knows the file name and the line
and column numbers of each instruction.

Ciao, Duncan.




More information about the llvm-dev mailing list