From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28507 invoked by alias); 3 Sep 2010 09:06:23 -0000 Received: (qmail 28496 invoked by uid 22791); 3 Sep 2010 09:06:22 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_SV 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; Fri, 03 Sep 2010 09:06:17 +0000 Received: by ywl5 with SMTP id 5so812898ywl.0 for ; Fri, 03 Sep 2010 02:06:16 -0700 (PDT) Received: by 10.151.98.10 with SMTP id a10mr512117ybm.228.1283504775019; Fri, 03 Sep 2010 02:06:15 -0700 (PDT) Received: from [192.168.1.239] ([202.201.14.141]) by mx.google.com with ESMTPS id t20sm3243222ybm.17.2010.09.03.02.06.10 (version=SSLv3 cipher=RC4-MD5); Fri, 03 Sep 2010 02:06:13 -0700 (PDT) Subject: Re: Linux Kernel GDB tracepoint module 2010-8-30 release From: Steven To: Hui Zhu Cc: "gdb@sourceware.org" , linux-kernel@vger.kernel.org, Michael Snyder , Marc Khouzam , Thiago Jung Bauermann In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Fri, 03 Sep 2010 09:06:00 -0000 Message-ID: <1283504768.2100.43.camel@steven> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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/msg00008.txt.bz2 Dear Hui, I encountered two issue when I use your GTP. 1) Following your HOWTO, I collect the two variables jiffies_64(global), *file(argument), the result are as following, where you may see jiffies_64 = 4298520928, that's OK, but the members of *file are all 0. What's the problem? Thank you very much! ------------------------------------------------------------------- (gdb) trace vfs_readdir Tracepoint 3 at 0xc1175690: file fs/readdir.c, line 23. (gdb) actions Enter actions for tracepoint 3, one per line. End with a line saying just "end". > collect jiffies_64 > collect *file > end (gdb) tstart (gdb) tstop (gdb) tfind #0 0xc1175691 i (file=0x0, filler=0, buf=0x0) at fs/readdir.c:23 23 { (gdb) p jiffies_64 $7 = 4298520928 (gdb) p *file $8 = {f_u = {fu_list = {next = 0x0, prev = 0x0}, fu_rcuhead = {next = 0x0, func = 0}}, f_path = {mnt = 0x0, dentry = 0x0}, f_op = 0x0, f_lock = {{ rlock = {raw_lock = {slock = 0}}}}, f_count = {counter = 0}, f_flags = 0, f_mode = 0, f_pos = 0, f_owner = {lock = {raw_lock = { lock = 0}}, pid = 0x0, pid_type = PIDTYPE_PID, uid = 0, euid = 0, signum = 0}, f_cred = 0x0, f_ra = {stra_pages = 00, f_security = 0x0, private_data = 0x0, f_ep_links = {next = 0x0, prev = 0x0}, f_mapping = 0x0} ------------------------------------------------------------------- 2) I can not collect local variable, despite I rebuild the kernel with -O0 optimization option. what is the problem? Many thanks ------------------------------------------------------------------- (gdb) trace fs/readdir.c:29 Tracepoint 2 at 0xc11756ca: file fs/readdir.c, line 29. (gdb) actions Enter actions for tracepoint 2, one per line. End with a line saying just "end". > collect res > end (gdb) tstart res: don't know symbol class 20 ------------------------------------------------------------------- Code fragment of readdir.c ------------------------------------------------------------------- 22 int vfs_readdir(struct file *file, filldir_t filler, void *buf) 23 { 24 struct inode *inode = file->f_path.dentry->d_inode; 25 int res = -ENOTDIR; 26 if (!file->f_op || !file->f_op->readdir) 27 goto out; 28 29 res = security_file_permission(file, MAY_READ); 30 if (res) 31 goto out; ------------------------------------------------------------------- Best Regards, Steven On Mon, 2010-08-30 at 15:00 +0800, Hui Zhu wrote: > http://kgtp.googlecode.com/files/kgtp_20100830.tar.bz2 > or > svn co https://kgtp.googlecode.com/svn/tags/20100830 > to get it. > > Fix bug in ref16, ref32, ref64 in issue > https://code.google.com/p/kgtp/issues/detail?id=2 > Fix bug that disable some tracepoint will make "tstart" get error. > > Support qtstatus. Then KGTP support GDB command "tstatus". > Add support for "make install" and "make uninstall". > Add support for qtro. Fix a bug about GTP_GDBRSP_REG_SIZE. > > Change gtp_list make it more efficient. > > Please goto http://code.google.com/p/kgtp/wiki/HOWTO to get more info > about how to use KGTP.