[LLVMdev] Getting the Debugging JIT-ed Code with GDB example to work

Zach Devito zdevito at stanford.edu
Tue Mar 25 13:35:14 PDT 2014


I'm trying to run the example described at:

http://llvm.org/docs/DebuggingJITedCode.html

I followed the sample command line session (below, with versions numbers
for everything), but gdb doesn't stop at the breakpoints as described. Any
idea what is wrong?

Thanks,

Zach


zdevito at derp:~/terra/tests$
> ~/clang+llvm-3.4-x86_64-unknown-ubuntu12.04/bin/clang -cc1 -O0 -g
> -emit-llvm showdebug.c
> zdevito at derp:~/terra/tests$ gdb --args
> ~/clang+llvm-3.4-x86_64-unknown-ubuntu12.04/bin/lli -use-mcjit showdebug.ll
> 5
> GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
> Copyright (C) 2012 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <
> http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-linux-gnu".
> For bug reporting instructions, please see:
> <http://bugs.launchpad.net/gdb-linaro/>...
> Reading symbols from
> /home/zdevito/clang+llvm-3.4-x86_64-unknown-ubuntu12.04/bin/lli...(no
> debugging symbols found)...done.
> (gdb) b showdebug.c:6
> No symbol table is loaded.  Use the "file" command.
> Make breakpoint pending on future shared library load? (y or [n]) y
> Breakpoint 1 (showdebug.c:6) pending.
> (gdb) r
> Starting program:
> /home/zdevito/clang+llvm-3.4-x86_64-unknown-ubuntu12.04/bin/lli -use-mcjit
> showdebug.ll 5
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> [Inferior 1 (process 8538) exited with code 0170]
> (gdb)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140325/9dd91f9d/attachment.html>


More information about the llvm-dev mailing list