[LLVMdev] CFE debug info progress

Reid Spencer reid at x10sys.com
Sun Oct 24 14:10:50 PDT 2004


On Sun, 2004-10-24 at 13:32, Michael McCracken wrote:
> Hi, I've got the cfe debug info to the point where it outputs correct
> function info, stoppoints for statements (but not for declarations
> anymore) and region ends at the beginning of the return block. So this
> is about as far as I wanted to go with it.
> 
> However, there's one last big problem that I need some advice on. Running :
> gcc -g -S -o foo.ll
> llvmas foo.ll
> 
> produces bytecode that works under lli -force-interpreter on OS X (JIT
> not working on my system)
> and llvm-db can list sources and functions.

Okay.

> 
> *but*
> 
> gcc -g -o foo 

What's the source file to be compiled? This should produce a "no input
files" error. Assuming you were attempting "gcc -g -o foo foo.c" ..

> 
> llvm-db foo.bc

Did gcc link foo.bc with glibc and/or stdc++ library? It invokes gccld
to do that.

> 
> doesn't see any debug info.
> 
> Worse, it doesn't work:
> 
> that's a JIT error, OK, so:
> 
> % lli -force-interpreter loops.bc 
> Tried to execute an unknown external function:  __main

This indicates you didn't link loops.bc with the stdc++ library which it
requires.

> Loops begin:
> /Users/mike/Documents/hpcl/LLVM/llvm/include/llvm/Support/Casting.h:197:
> failed assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible
> type!"'
> Abort

Not sure what that's about, but its probably related to missing __main.

> 
> That's not good.
> Any advice on debugging this?
> 
> Thanks,
> -mike

Hope this helps.

Reid.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20041024/9d051480/attachment.sig>


More information about the llvm-dev mailing list