[LLVMdev] Debugging lli using bugpoint
Prakash Prabhu
prakash.prabhu at gmail.com
Tue Oct 28 12:17:29 PDT 2008
Hi,
I have a program that runs when statically compiled using llc and gcc but
crashes with a segmentation fault when run with lli. I am trying to debug it
with bugpoint and the initial part of bugpoint seems to be suggesting that I
am somehow missing the linking with the libraries having dlsym/dlopen
although I am passing it to lli :
*$ bugpoint -run-jit $HOME/gap/gap4r4/bin/i686-pc-linux-gnu-llvm-gcc/gap.bc
--tool-args -load=/usr/lib/libm.so -load=/usr/lib/libdl.so --args -l
$HOME/gap/gap4r4/ -m 1024M*
Read input file :
'/home/pprabhu/gap/gap4r4/bin/i686-pc-linux-gnu-llvm-gcc/gap.bc'
*** All input ok
Initializing execution environment: Found lli:
/home/pprabhu/llvm/llvm-install/bin/lli
Running the code generator to test for a crash:
Generating reference output from raw program: <cbe><gcc>
Error running tool:
/usr/bin/gcc -x c -fno-strict-aliasing bugpoint-test-program.bc.cbe.c -x
none -o bugpoint-test-program.bc.cbe.c.gcc.exe -lm -O2 -Wl,-R.
bugpoint-test-program.bc.cbe.c:5149: warning: conflicting types for built-in
function 'malloc'
bugpoint-test-program.bc.cbe.c: In function 'ExecProccall0args':
bugpoint-test-program.bc.cbe.c:401008: warning: passing argument 1 of
'longjmp' from incompatible pointer type
....
*/tmp/cc08IpX8.o: In function `SyLoadModule':
bugpoint-test-program.bc.cbe.c:(.text+0x25705): undefined reference to
`dlopen'
bugpoint-test-program.bc.cbe.c:(.text+0x25719): undefined reference to
`dlsym'
/tmp/cc08IpX8.o: In function `SyFindOrLinkGapRootFile':
bugpoint-test-program.bc.cbe.c:(.text+0x6b951): undefined reference to
`dlopen'
bugpoint-test-program.bc.cbe.c:(.text+0x6b965): undefined reference to
`dlsym'
/tmp/cc08IpX8.o: In function `FuncLOAD_DYN':
bugpoint-test-program.bc.cbe.c:(.text+0x12a92d): undefined reference to
`dlopen'
bugpoint-test-program.bc.cbe.c:(.text+0x12a945): undefined reference to
`dlsym'
/tmp/cc08IpX8.o: In function `LoadWorkspace':
bugpoint-test-program.bc.cbe.c:(.text+0x14487a): undefined reference to
`dlopen'
bugpoint-test-program.bc.cbe.c:(.text+0x144892): undefined reference to
`dlsym'
collect2: ld returned 1 exit status*
*** Debugging code generator crash!
Checking to see if we can delete global inits:
- Removing all global inits hides problem!
*** Attempting to reduce the number of global variables in the testcase
Checking for crash with only these global variables: Revision_ariths_c
ZeroFuncs ZeroMutFuncs AInvFuncs AInvMutFuncs OneFuncs OneMutFuncs InvFuncs
InvMutFuncs EqFuncs... <5919 total>:
*** Attempting to reduce the number of functions in the testcase
Checking for crash with only these functions: InstallZeroObject
VerboseZeroObject ZeroObject FuncZERO InstallZeroMutObject
VerboseZeroMutObject ZeroMutObject FuncZERO_MUT InstallAinvObject
VerboseAInvObject... <2883 total>:
Checking for crash with only these blocks: entry entry bb bb2 entry bb bb2
entry bb1 bb2... <77209 total>:
Is there something that I missing here (like some more parameters to lli or
to bugpoint) because the program seems to run fine when compiled with llc.
Thanks for your time.
- Prakash
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20081028/804409c5/attachment.html>
More information about the llvm-dev
mailing list