[LLVMdev] getMetadata(“dbg”) returns NULL

李永超 lyc364 at gmail.com
Thu Apr 24 01:42:28 PDT 2014


Hi,
getMetadata(“dbg”) returns NULL for such a small program as follows:




int main(){
	char a[10], b[2];
	if(a[0] != 0 && a[1] != 0){
		strcpy(a, b);
	}
	return 0;
}



The compiling command is:  llvm-gcc --emit-llvm -g -c ./src.c


I also tried the solutions I found through Google:
http://stackoverflow.com/questions/14943447/llvm-line-number-of-an-instruction
http://stackoverflow.com/questions/23089316/getmetadatadbg-returns-null-despite-producing-ir-with-clang-g-s-emit-llv


but neither of them works. 


Does anyone have any idea about this?
Thanks,
Yongchao.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140424/4b396886/attachment.html>


More information about the llvm-dev mailing list