[LLVMdev] question on the status of debugging symbols

432 views
Skip to first unread message

Bagel

unread,
Nov 23, 2010, 1:03:26 PM11/23/10
to llv...@cs.uiuc.edu
Would someone be so kind as to tell me what the status of debugging symbols
(DWARF) generated by clang/llvm is?

I am on a linux x86-64 system (Fedora 13). Is gdb supposed to understand the
generated DWARF?

When I generate an executable with "clang -g" followed by "llc -O0" and feed it
to gdb, I get "no debugging symbols found".

What is the status of lldb on linux?

thanks,
bagel

_______________________________________________
LLVM Developers mailing list
LLV...@cs.uiuc.edu http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

Renato Golin

unread,
Nov 24, 2010, 6:15:29 AM11/24/10
to Bagel, llv...@cs.uiuc.edu
On 23 November 2010 18:03, Bagel <bag...@gmail.com> wrote:
> Would someone be so kind as to tell me what the status of debugging symbols
> (DWARF) generated by clang/llvm is?

Hi Bagel,

It should be fairly complete...


> When I generate an executable with "clang -g" followed by "llc -O0" and feed it
> to gdb, I get "no debugging symbols found".
>
> What is the status of lldb on linux?

Just ran the same thing and got all symbols, can you show your
specific command line options?

I did:

$ clang -S -g -emit-llvm test.c -o test.ll
$ llc -O0 test.ll -o test.s
$ gcc test.s -o test
$ gdb ./test

Also works:

$ clang -S -g test.c -o test.s
$ gcc test.s -o test
$ gdb ./test

etc.

cheers,
--renato

Xinfinity

unread,
Nov 29, 2010, 10:46:38 AM11/29/10
to llv...@cs.uiuc.edu

Maybe you have to install LLVM in Debug+Assertions mode, not in Release mode.
Alexandra

--
View this message in context: http://old.nabble.com/question-on-the-status-of-debugging-symbols-tp30289999p30331697.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.

Tobias Grosser

unread,
Nov 29, 2010, 11:26:43 AM11/29/10
to Renato Golin, Bagel, llv...@cs.uiuc.edu
On 11/24/2010 06:15 AM, Renato Golin wrote:
> On 23 November 2010 18:03, Bagel<bag...@gmail.com> wrote:
>> Would someone be so kind as to tell me what the status of debugging symbols
>> (DWARF) generated by clang/llvm is?
>
> Hi Bagel,
>
> It should be fairly complete...

I believe their is a huge regression with gdb 7.2. Ubuntu 10.10 just
switched to it and it seems I cannot use ">call function" in gdb to call
many C++ functions compiled with clang. Most of the time I get:

"Cannot evaluate function -- may be inlined"

I did not try clang from today, but a couple of weeks ago this still
failed and the corresponding bug report is not yet closed:

http://llvm.org/bugs/show_bug.cgi?id=8045

I believe I figured out what the problem was. I also created a reduced
test case, but did not have the time to obtain the knowledge to fix it.
Maybe someone with DWARF knowledge could have a look?

Tobi

Reply all
Reply to author
Forward
0 new messages