[LLVMdev] Bug in WritingAnLLVMPass.html

Zhongxing Xu xzx at ios.ac.cn
Thu Sep 28 06:19:25 PDT 2006


I find a bug in document llvm/docs/WritingAnLLVMPass.html#debughints

Since the PassManager class is in the namespace llvm, we should use command

(gdb) break llvm::PassManager::run

to set breakpoint. Otherwise we get error message:

(gdb) break PassManager::run
Can't find member of namespace, class, struct, or union named "PassManager::run"
Hint: try 'PassManager::run<TAB> or 'PassManager::run<ESC-?>
(Note leading single quote.)

The patch is:

--- WritingAnLLVMPass.html      2006-03-14 13:39:39.000000000 +0800
+++ WritingAnLLVMPass-new.html  2006-09-28 21:06:36.000000000 +0800
@@ -1475,7 +1475,7 @@
 want:</p>

 <pre>
-(gdb) <b>break PassManager::run</b>
+(gdb) <b>break llvm::PassManager::run</b>
 Breakpoint 1 at 0x2413bc: file Pass.cpp, line 70.
 (gdb) <b>run test.bc -load $(LLVMTOP)/llvm/Debug/lib/[libname].so -[passoption]</b>
 Starting program: opt test.bc -load $(LLVMTOP)/llvm/Debug/lib/[libname].so -[passoption]




More information about the llvm-dev mailing list