Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Hui Zhu <teawater@gmail.com>
To: "gdb@sourceware.org" <gdb@sourceware.org>, linux-kernel@vger.kernel.org
Cc: Michael Snyder <msnyder@vmware.com>,
	Marc Khouzam <marc.khouzam@ericsson.com>,
		Thiago Jung Bauermann <thiago.bauermann@gmail.com>
Subject: Re: Linux Kernel GDB tracepoint module support most collect now
Date: Mon, 23 Aug 2010 08:39:00 -0000	[thread overview]
Message-ID: <AANLkTinP3ZcBgr5rt=gLeLXb7szBcEkErB_4QYYmx2vM@mail.gmail.com> (raw)
In-Reply-To: <AANLkTini-CCAe2wrVytdURKAwj+kpLvj1tU0DNRVEsqN@mail.gmail.com>

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 <teawater@gmail.com> 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      block    firmware  i        ipc     Makefile
> modules.order   scripts   source      t~    vmlinux
> a.out  crypto   fs        include  kernel  mm
> Module.symvers  security  System.map  usr   vmlinux.o
> arch   drivers  gdb.txt   init     lib     modules.builtin  net
>     sound     t           virt
> (gdb) tstop
> (gdb) tfind
> Found trace frame 0, tracepoint 1
> #0  0xffffffff8113f7fd in vfs_readdir (file=0xffff880075f00780,
> filler=0xffffffff8113f630 <filldir>, buf=0xffff880005785f38)
>    at /home/teawater/kernel/linux-2.6/fs/readdir.c:24
> 24      {
> (gdb) bt
> #0  0xffffffff8113f7fd in vfs_readdir (file=0xffff880075f00780,
> filler=0xffffffff8113f630 <filldir>, buf=0xffff880005785f38)
>    at /home/teawater/kernel/linux-2.6/fs/readdir.c:24
> #1  0xffffffff8113fa14 in sys_getdents (fd=<value optimized out>,
> dirent=0x801108, count=32768)
>    at /home/teawater/kernel/linux-2.6/fs/readdir.c:214
> #2  0xffffffff8100af42 in ?? () at
> /home/teawater/kernel/linux-2.6/arch/x86/kernel/entry_64.S:487
> #3  0x00007f3249a81765 in ?? ()
> #4  0x00000018555503f7 in ?? ()
> #5  0x0000015400000000 in ?? ()
> #6  0x0000000000bf5048 in ?? ()
> #7  0x0000000000000000 in ?? ()
> (gdb) p file
> $1 = (struct file *) 0xffff880075f00780
> (gdb) p *file
> $2 = {f_u = {fu_list = {next = 0xffff880075f00480, prev =
> 0xffffe8ffffc06948}, fu_rcuhead = {next = 0xffff880075f00480,
>      func = 0xffffe8ffffc06948}}, f_path = {mnt = 0xffff880037d92e00,
> dentry = 0xffff8800353239c0}, f_op = 0xffffffff81622a60, f_lock = {{
>      rlock = {raw_lock = {slock = 0}}}}, f_sb_list_cpu = 0, f_count =
> {counter = 2}, f_flags = 624640, f_mode = 29, f_pos = 0, f_owner = {
>    lock = {raw_lock = {lock = 16777216}}, pid = 0x0, pid_type =
> PIDTYPE_PID, uid = 0, euid = 0, signum = 0}, f_cred =
> 0xffff880079b40a80,
>  f_ra = {start = 0, size = 0, async_size = 0, ra_pages = 32,
> mmap_miss = 0, prev_pos = -1}, f_version = 0, f_security = 0x0,
>  private_data = 0x0, f_ep_links = {next = 0xffff880075f00828, prev =
> 0xffff880075f00828}, f_mapping = 0xffff88003539d6b8}
> (gdb) tfind
> Found trace frame 1, tracepoint 1
> 0xffffffff8113f7fd      24      {
> (gdb) bt
> #0  0xffffffff8113f7fd in vfs_readdir (file=0xffff880075f00780,
> filler=0xffffffff8113f630 <filldir>, buf=0xffff880005785f38)
>    at /home/teawater/kernel/linux-2.6/fs/readdir.c:24
> #1  0xffffffff8113fa14 in sys_getdents (fd=<value optimized out>,
> dirent=0x801108, count=32768)
>    at /home/teawater/kernel/linux-2.6/fs/readdir.c:214
> #2  0xffffffff8100af42 in ?? () at
> /home/teawater/kernel/linux-2.6/arch/x86/kernel/entry_64.S:487
> #3  0x00007f3249a81765 in ?? ()
> #4  0x00000018555503f7 in ?? ()
> #5  0x0000015400000000 in ?? ()
> #6  0x0000000000bf5048 in ?? ()
> #7  0x0000000000000000 in ?? ()
> (gdb) p *file
> $3 = {f_u = {fu_list = {next = 0xffff880075f00480, prev =
> 0xffffe8ffffc06948}, fu_rcuhead = {next = 0xffff880075f00480,
>      func = 0xffffe8ffffc06948}}, f_path = {mnt = 0xffff880037d92e00,
> dentry = 0xffff8800353239c0}, f_op = 0xffffffff81622a60, f_lock = {{
>      rlock = {raw_lock = {slock = 0}}}}, f_sb_list_cpu = 0, f_count =
> {counter = 2}, f_flags = 624640, f_mode = 29, f_pos = 2147483647,
>  f_owner = {lock = {raw_lock = {lock = 16777216}}, pid = 0x0,
> pid_type = PIDTYPE_PID, uid = 0, euid = 0, signum = 0},
>  f_cred = 0xffff880079b40a80, f_ra = {start = 0, size = 0, async_size
> = 0, ra_pages = 32, mmap_miss = 0, prev_pos = -1}, f_version = 16,
>  f_security = 0x0, private_data = 0xffff8800755d5600, f_ep_links =
> {next = 0xffff880075f00828, prev = 0xffff880075f00828},
>  f_mapping = 0xffff88003539d6b8}
>


  reply	other threads:[~2010-08-23  8:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-22 15:17 Hui Zhu
2010-08-23  8:39 ` Hui Zhu [this message]
2010-08-23  9:06   ` Hui Zhu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTinP3ZcBgr5rt=gLeLXb7szBcEkErB_4QYYmx2vM@mail.gmail.com' \
    --to=teawater@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.khouzam@ericsson.com \
    --cc=msnyder@vmware.com \
    --cc=thiago.bauermann@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox