From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11907 invoked by alias); 23 Aug 2010 09:06:04 -0000 Received: (qmail 11898 invoked by uid 22791); 23 Aug 2010 09:06:03 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_KG X-Spam-Check-By: sourceware.org Received: from mail-ww0-f43.google.com (HELO mail-ww0-f43.google.com) (74.125.82.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 23 Aug 2010 09:05:30 +0000 Received: by wwe15 with SMTP id 15so3864043wwe.12 for ; Mon, 23 Aug 2010 02:05:27 -0700 (PDT) Received: by 10.216.236.146 with SMTP id w18mr4225444weq.19.1282554325266; Mon, 23 Aug 2010 02:05:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.186.205 with HTTP; Mon, 23 Aug 2010 02:05:05 -0700 (PDT) In-Reply-To: References: From: Hui Zhu Date: Mon, 23 Aug 2010 09:06:00 -0000 Message-ID: Subject: Re: Linux Kernel GDB tracepoint module support most collect now To: "gdb@sourceware.org" , linux-kernel@vger.kernel.org, mqyoung@gmail.com Cc: Michael Snyder , Marc Khouzam , Thiago Jung Bauermann 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-08/txt/msg00135.txt.bz2 Some people have trouble with access to KGTP website. You can access kgtp through svn: svn checkout http://kgtp.googlecode.com/svn/ kgtp-read-only kgtp-read-only/tags/ This directory have each release of KGTP. The debug of this KGTP is open, please open gtp.c file remove line "#define GTP_DEBUG KERN_WARNING" to close it. Thanks, Hui On Mon, Aug 23, 2010 at 16:39, Hui Zhu wrote: > Do a small update to fix a dangerous bug. > > http://kgtp.googlecode.com/files/kgtp_20100823.tar.bz2 > > Thanks, > Hui > > On Sun, Aug 22, 2010 at 23:16, Hui Zhu wrote: >> Linux Kernel GDB tracepoint module support action X and all agent >> expression except the trace state variable codes. So KGTP can support >> a lot of collect command of tracepoint in x86-64 and x86-32. >> >> To get the new KGTP please goto http://code.google.com/p/kgtp/downloads/= list >> >> To get more message about GDB tracepoint please goto >> http://sourceware.org/gdb/current/onlinedocs/gdb/Tracepoints.html >> >> For example: >> >> make >> sudo insmod gtp.ko >> sudo gdb ./vmlinux >> >> (gdb) trace vfs_readdir >> Tracepoint 1 at 0xffffffff8113f7fc: file >> /home/teawater/kernel/linux-2.6/fs/readdir.c, line 24. >> (gdb) actions >> Enter actions for tracepoint 1, one per line. >> End with a line saying just "end". >>>collect *(unsigned char *)$rsp@512 >>>collect *file >>>end >> (gdb) target remote /proc/gtp >> Remote debugging using /proc/gtp >> 0x0000000000000000 in ?? () >> (gdb) tstart >> (gdb) shell ls >> 2 =A0 =A0 =A0block =A0 =A0firmware =A0i =A0 =A0 =A0 =A0ipc =A0 =A0 Makef= ile >> modules.order =A0 scripts =A0 source =A0 =A0 =A0t~ =A0 =A0vmlinux >> a.out =A0crypto =A0 fs =A0 =A0 =A0 =A0include =A0kernel =A0mm >> Module.symvers =A0security =A0System.map =A0usr =A0 vmlinux.o >> arch =A0 drivers =A0gdb.txt =A0 init =A0 =A0 lib =A0 =A0 modules.builtin= =A0net >> =A0 =A0 sound =A0 =A0 t =A0 =A0 =A0 =A0 =A0 virt >> (gdb) tstop >> (gdb) tfind >> Found trace frame 0, tracepoint 1 >> #0 =A00xffffffff8113f7fd in vfs_readdir (file=3D0xffff880075f00780, >> filler=3D0xffffffff8113f630 , buf=3D0xffff880005785f38) >> =A0 =A0at /home/teawater/kernel/linux-2.6/fs/readdir.c:24 >> 24 =A0 =A0 =A0{ >> (gdb) bt >> #0 =A00xffffffff8113f7fd in vfs_readdir (file=3D0xffff880075f00780, >> filler=3D0xffffffff8113f630 , buf=3D0xffff880005785f38) >> =A0 =A0at /home/teawater/kernel/linux-2.6/fs/readdir.c:24 >> #1 =A00xffffffff8113fa14 in sys_getdents (fd=3D, >> dirent=3D0x801108, count=3D32768) >> =A0 =A0at /home/teawater/kernel/linux-2.6/fs/readdir.c:214 >> #2 =A00xffffffff8100af42 in ?? () at >> /home/teawater/kernel/linux-2.6/arch/x86/kernel/entry_64.S:487 >> #3 =A00x00007f3249a81765 in ?? () >> #4 =A00x00000018555503f7 in ?? () >> #5 =A00x0000015400000000 in ?? () >> #6 =A00x0000000000bf5048 in ?? () >> #7 =A00x0000000000000000 in ?? () >> (gdb) p file >> $1 =3D (struct file *) 0xffff880075f00780 >> (gdb) p *file >> $2 =3D {f_u =3D {fu_list =3D {next =3D 0xffff880075f00480, prev =3D >> 0xffffe8ffffc06948}, fu_rcuhead =3D {next =3D 0xffff880075f00480, >> =A0 =A0 =A0func =3D 0xffffe8ffffc06948}}, f_path =3D {mnt =3D 0xffff8800= 37d92e00, >> dentry =3D 0xffff8800353239c0}, f_op =3D 0xffffffff81622a60, f_lock =3D = {{ >> =A0 =A0 =A0rlock =3D {raw_lock =3D {slock =3D 0}}}}, f_sb_list_cpu =3D 0= , f_count =3D >> {counter =3D 2}, f_flags =3D 624640, f_mode =3D 29, f_pos =3D 0, f_owner= =3D { >> =A0 =A0lock =3D {raw_lock =3D {lock =3D 16777216}}, pid =3D 0x0, pid_typ= e =3D >> PIDTYPE_PID, uid =3D 0, euid =3D 0, signum =3D 0}, f_cred =3D >> 0xffff880079b40a80, >> =A0f_ra =3D {start =3D 0, size =3D 0, async_size =3D 0, ra_pages =3D 32, >> mmap_miss =3D 0, prev_pos =3D -1}, f_version =3D 0, f_security =3D 0x0, >> =A0private_data =3D 0x0, f_ep_links =3D {next =3D 0xffff880075f00828, pr= ev =3D >> 0xffff880075f00828}, f_mapping =3D 0xffff88003539d6b8} >> (gdb) tfind >> Found trace frame 1, tracepoint 1 >> 0xffffffff8113f7fd =A0 =A0 =A024 =A0 =A0 =A0{ >> (gdb) bt >> #0 =A00xffffffff8113f7fd in vfs_readdir (file=3D0xffff880075f00780, >> filler=3D0xffffffff8113f630 , buf=3D0xffff880005785f38) >> =A0 =A0at /home/teawater/kernel/linux-2.6/fs/readdir.c:24 >> #1 =A00xffffffff8113fa14 in sys_getdents (fd=3D, >> dirent=3D0x801108, count=3D32768) >> =A0 =A0at /home/teawater/kernel/linux-2.6/fs/readdir.c:214 >> #2 =A00xffffffff8100af42 in ?? () at >> /home/teawater/kernel/linux-2.6/arch/x86/kernel/entry_64.S:487 >> #3 =A00x00007f3249a81765 in ?? () >> #4 =A00x00000018555503f7 in ?? () >> #5 =A00x0000015400000000 in ?? () >> #6 =A00x0000000000bf5048 in ?? () >> #7 =A00x0000000000000000 in ?? () >> (gdb) p *file >> $3 =3D {f_u =3D {fu_list =3D {next =3D 0xffff880075f00480, prev =3D >> 0xffffe8ffffc06948}, fu_rcuhead =3D {next =3D 0xffff880075f00480, >> =A0 =A0 =A0func =3D 0xffffe8ffffc06948}}, f_path =3D {mnt =3D 0xffff8800= 37d92e00, >> dentry =3D 0xffff8800353239c0}, f_op =3D 0xffffffff81622a60, f_lock =3D = {{ >> =A0 =A0 =A0rlock =3D {raw_lock =3D {slock =3D 0}}}}, f_sb_list_cpu =3D 0= , f_count =3D >> {counter =3D 2}, f_flags =3D 624640, f_mode =3D 29, f_pos =3D 2147483647, >> =A0f_owner =3D {lock =3D {raw_lock =3D {lock =3D 16777216}}, pid =3D 0x0, >> pid_type =3D PIDTYPE_PID, uid =3D 0, euid =3D 0, signum =3D 0}, >> =A0f_cred =3D 0xffff880079b40a80, f_ra =3D {start =3D 0, size =3D 0, asy= nc_size >> =3D 0, ra_pages =3D 32, mmap_miss =3D 0, prev_pos =3D -1}, f_version =3D= 16, >> =A0f_security =3D 0x0, private_data =3D 0xffff8800755d5600, f_ep_links = =3D >> {next =3D 0xffff880075f00828, prev =3D 0xffff880075f00828}, >> =A0f_mapping =3D 0xffff88003539d6b8} >> >