[LLVMdev] Problem with x86 32-bit debug information ?

Seb babslachem at gmail.com
Wed Mar 7 05:17:08 PST 2012


Hi all,

I'm using trunk version of LLVM/CLANG.
When I compile attached files on my 64-bit Ubuntu 10.04 LTS system as
follows:

clang -O2 -g check.c main.c -o check64

When I do gdb check64 and set a breakpoint to the check routine and
executes to the breakpoint, I've got:

Breakpoint 1, check (result=0x601110, expect=0x601020, n=53) at check.c:7
7    {

As you can see I can inspect 'n' value.

Now if I compile for x86 32-bit as follows:

clang -m32 -O2 -g check.c main.c -o check32

When I do gdb check32 and set a breakpoint to the check routine and
executes to the breakpoint, I've got:

Breakpoint 1, check (result=<value optimized out>,
    expect=<value optimized out>, n=0) at check.c:7
7    {

As you can see I can NOT inspect 'n' value. Is there a way to inforce even
at -O2 clang to generate debug informations so that I can inspect 'n' value
?
Or is it a BUG from clang for x86 32-bit ?
Thanks for your answers.
Best Regards
Seb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120307/7b8e4233/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check.c
Type: text/x-csrc
Size: 724 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120307/7b8e4233/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.c
Type: text/x-csrc
Size: 899 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120307/7b8e4233/attachment-0001.c>


More information about the llvm-dev mailing list