[LLVMdev] debugging a pass for LTO

jiaqi zhang zation99 at gmail.com
Fri Jan 22 11:30:58 PST 2010


I'm trying to write a pass for LTO, and now I want to debug it using
gdb. I use ld as my target file, but when I run the program in gdb, it

[Thread debugging using libthread_db enabled]
Cannot find new threads: generic error


  this->handle_ = dlopen(this->filename_.c_str(), RTLD_NOW);

in binutil/src/gold/plugin.cc

The gdb version is 7.0.1. I tried it with other multi-threaded
programs without any problem. Have I missed something? Or I shouldn't
debug my pass this way at all?

btw, "llvm-gcc -use-gold-plugin" works fine when I compile my program.

Thanks very much.

Best regards
JiaQi Zhang

More information about the llvm-dev mailing list