This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Linux Kernel GDB tracepoint module 2011-02-05
- From: Hui Zhu <teawater at gmail dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: 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>, Steven <mqyoung at gmail dot com>, colyli at gmail dot com, Christoph Hellwig <hch at infradead dot org>, "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Tue, 8 Feb 2011 21:23:52 +0800
- Subject: Re: [PATCH] Linux Kernel GDB tracepoint module 2011-02-05
- References: <AANLkTikhfhYjvmvXtjW-Mszpq8d_3Syo=H4zqWe+1hEg__12255.0142732964$1296923928$gmane$org@mail.gmail.com> <m3hbcfzu9u.fsf@fleche.redhat.com>
On Tue, Feb 8, 2011 at 00:25, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> ">" == Hui Zhu <teawater@gmail.com> 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. ?IME, the VTA
> patches really helped with this problem a lot -- though not completely.
> If you are not using a VTA-enabled GCC, you should. ?And 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