[cfe-dev] Clang Executable Debugging with GDB

Luke Mauldin lukemauldin at gmail.com
Sat Dec 15 07:28:53 PST 2012


Hi all,

I have built a simple executable with Clang (build commands are below) and
I am trying to debug the executable with GDB.  I am able to set
break-points in GDB and step through the code but no information about
variables is available.  Is this a known limitation of Clang and GDB or I
am doing something wrong?

clang++ -O0 -emit-llvm -g3 -Wall -c -fmessage-length=0 -o src/main.bc
../src/main.cpp
llvm-ld -v -L/usr/lib/gcc/x86_64-linux-gnu/4.7/ -native -o
TestPocoServerClang src/main.bc -lstdc++ -lPocoFoundation -lPocoNet
-lPocoUtil
  Linking bitcode file 'src/main.bc'
  Linked in file 'src/main.bc'
  Linking archive file '/usr/lib/gcc/x86_64-linux-gnu/4.7/libstdc++.a'
  Linking archive file '/usr/local/lib/libPocoFoundation.a'
  Linking archive file '/usr/local/lib/libPocoNet.a'
  Linking archive file '/usr/local/lib/libPocoUtil.a'
Generating Bitcode To TestPocoServerClang.bc
Generating Assembly With:
'/usr/local/bin/llc' '-x86-asm-syntax=att' '-o' 'TestPocoServerClang.s'
'TestPocoServerClang.bc'
Generating Native Executable With:
'/usr/bin/gcc' '-fno-strict-aliasing' '-O3' '-o' 'TestPocoServerClang'
'TestPocoServerClang.s' '-L/usr/lib/gcc/x86_64-linux-gnu/4.7/' '-lstdc++'
'-lPocoFoundation' '-lPocoNet' '-lPocoUtil'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121215/254c7d57/attachment.html>


More information about the cfe-dev mailing list