This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Linux Kernel GDB tracepoint module 2010-8-30 release
- From: Hui Zhu <teawater at gmail dot com>
- To: Steven <mqyoung at gmail dot com>
- Cc: "gdb at sourceware dot org" <gdb at sourceware dot org>, linux-kernel at vger dot kernel dot org, Michael Snyder <msnyder at vmware dot com>, Marc Khouzam <marc dot khouzam at ericsson dot com>, Thiago Jung Bauermann <thiago dot bauermann at gmail dot com>, "Frank Ch. Eigler" <fche at redhat dot com>
- Date: Sat, 4 Sep 2010 17:17:27 +0800
- Subject: Re: Linux Kernel GDB tracepoint module 2010-8-30 release
- References: <AANLkTimjO7sBzR55XkPB7dmZvxXqc8PS4UDsgptXVt90@mail.gmail.com> <1283504768.2100.43.camel@steven> <AANLkTik=0wMHh9fg8_vK_Aor40J43mNojvfHadhHObKA@mail.gmail.com> <1283590584.1685.39.camel@steven>
On Sat, Sep 4, 2010 at 16:56, Steven <mqyoung@gmail.com> wrote:
> On Sat, 2010-09-04 at 11:41 +0800, Hui Zhu wrote:
>> BTW, looks GCC and GDB don't want handle the optimization debug
>> trouble (all they want is rewrite the GCC in C++ :P).
>> So I think make linux kernel can close optimization is better idea, do
>> you know some way or some patch to do it?
>>
>
> Just disable CONFIG_CC_OPTIMIZE_FOR_SIZE and modify the Makefile of
> kernel:
> KBUILD_CFLAGS ? += -O2
> to
> KBUILD_CFLAGS ? += -O0
Cool, :)
I try just change the compile option of readdir.c to without -O2, it
works OK. I think maybe it's a GDB bug too.
Could you try the second issue with gdb 7.2?
BTW, I think I need add some words let all the KGTP user use gdb 7.2
with KGTP in howto. :)
Thanks for help me with this big issue. :)
Best,
Hui
>
> Sometime gcc will still optimize out some variables even I compile a
> program with -O0, so volatile is required sometimes.
>
> Thanks,
> Steven
>
>