From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8930 invoked by alias); 8 Feb 2011 13:24:20 -0000 Received: (qmail 8919 invoked by uid 22791); 8 Feb 2011 13:24:19 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-yw0-f41.google.com (HELO mail-yw0-f41.google.com) (209.85.213.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 Feb 2011 13:24:14 +0000 Received: by ywj3 with SMTP id 3so2581395ywj.0 for ; Tue, 08 Feb 2011 05:24:13 -0800 (PST) Received: by 10.236.102.129 with SMTP id d1mr2367935yhg.50.1297171453068; Tue, 08 Feb 2011 05:24:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.147.34.12 with HTTP; Tue, 8 Feb 2011 05:23:52 -0800 (PST) In-Reply-To: References: From: Hui Zhu Date: Tue, 08 Feb 2011 13:24:00 -0000 Message-ID: Subject: Re: [PATCH] Linux Kernel GDB tracepoint module 2011-02-05 To: Tom Tromey Cc: linux-kernel@vger.kernel.org, Michael Snyder , Marc Khouzam , Thiago Jung Bauermann , Steven , colyli@gmail.com, Christoph Hellwig , "gdb@sourceware.org" 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: 2011-02/txt/msg00044.txt.bz2 On Tue, Feb 8, 2011 at 00:25, Tom Tromey wrote: >>>>>> ">" =3D=3D Hui Zhu writes: > >>> We have trouble for this printf is GDB is still not accept the patch >>> that make tracepoint support printf, So if you want use it, you need >>> patch the patch in >>> http://sourceware.org/ml/gdb-patches/2011-02/msg00063.html and build >>> your GDB with yourself. > > Thanks, I think this example was helpful. > >>> Sometimes, GDB will output some value like: >>> inode has been optimized out of existence. >>> res has been optimized out of existence. >>> That is because value of inode and res is optimized. Linux Kernel is >>> built with -O2 so you will get this trouble sometimes. If you do not >>> care about the speed when you debug the Kernel, you can use the patch >>> for Linux Kernel in > > I am curious to know what version of GCC you are using. =A0IME, the VTA > patches really helped with this problem a lot -- though not completely. > If you are not using a VTA-enabled GCC, you should. =A0And if you are, I > think bug reports about values that are still optimized out would be > useful. My gcc is 4.4.5. Does it have VTA? Use the patch is easier than update gcc sometimes, right? :) BTW does VTA can handle the issue that after -O2 a lot of code execution order is worong? It affect me when I debug the Linux Kernel in qemu. Thanks, Hui