[LLVMdev] Debugging LLVM opt pass

Harmen van der Spek hvdspek at liacs.nl
Mon Jan 11 00:33:48 PST 2010


Compile all sources in DEBUG mode. Then you can run opt in gdb for 
instance, set command line arguments using "set args" and set a 
breakpoint using "break file:linenum".

This also works for debugging dynamically linked libraries loaded
with the -load option of opt.

Harmen




Gang-Ryung Uh wrote:
>        *What would be the recommended way to debug LLVM opt pass? Is 
> there any way to perform source level debugging on a particular opt pass?
> *
> *-- UGR*
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list