[LLVMdev] Re: standalone llvm
Simon Burton
simon at arrowtheory.com
Fri Apr 14 03:44:44 PDT 2006
On Fri, 14 Apr 2006 03:25:39 +0200
Oscar Fuentes <oscarfv at telefonica.net> wrote:
...
> Simon,
>
> With a fresh CVS checkout, I've tried your test case on Windows/VC++
> and it works ok. Too bad that I have not access to a Linux machine
> right now. I'll like to see what's wrong with your test case.
>
> What you get from running the test case under gdb and inspecting the
> value of add1 just before the function invocation?
>
> There are several possibilities here: either add1 is assigned a NULL
> pointer, or LLVM was unable to use the JIT and generates bytecode
> instead of native code, or invalid native code was generated
> (unlikely).
Well, it's not NULL:
(gdb) print add1
$1 = (int (*)(int)) 0x83e43b8
(gdb) print ((char*)add1)
$2 = 0x83e43b8 "h\2245\b\002"
>
> What happens when you execute your function the same way the Fibonacci
> example does? (See examples/Fibonacci/fibonacci.cpp line 112).
That works OK.
Simon.
--
Simon Burton, B.Sc.
Licensed PO Box 8066
ANU Canberra 2601
Australia
Ph. 61 02 6249 6940
http://arrowtheory.com
More information about the llvm-dev
mailing list