From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11332 invoked by alias); 4 Sep 2010 09:17:55 -0000 Received: (qmail 11324 invoked by uid 22791); 4 Sep 2010 09:17:54 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-wy0-f169.google.com (HELO mail-wy0-f169.google.com) (74.125.82.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 04 Sep 2010 09:17:49 +0000 Received: by wyb36 with SMTP id 36so3172857wyb.0 for ; Sat, 04 Sep 2010 02:17:47 -0700 (PDT) Received: by 10.216.1.18 with SMTP id 18mr1373118wec.24.1283591867156; Sat, 04 Sep 2010 02:17:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.181.213 with HTTP; Sat, 4 Sep 2010 02:17:27 -0700 (PDT) In-Reply-To: <1283590584.1685.39.camel@steven> References: <1283504768.2100.43.camel@steven> <1283590584.1685.39.camel@steven> From: Hui Zhu Date: Sat, 04 Sep 2010 09:17:00 -0000 Message-ID: Subject: Re: Linux Kernel GDB tracepoint module 2010-8-30 release To: Steven Cc: "gdb@sourceware.org" , linux-kernel@vger.kernel.org, Michael Snyder , Marc Khouzam , Thiago Jung Bauermann , "Frank Ch. Eigler" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-09/txt/msg00026.txt.bz2 On Sat, Sep 4, 2010 at 16:56, Steven 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 =A0 +=3D -O2 > to > KBUILD_CFLAGS =A0 +=3D -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 > >