Re: Linux Kernel GDB tracepoint module 2010-8-30 release

From: Frank Ch. Eigler
Date: Sat Sep 04 2010 - 14:22:28 EST


Hi -


Hui Zhu <teawater@xxxxxxxxx> wrote:

> I met a issue with build systemtap. Build it need (install
> elfutils-devel, libebl-dev, libdw-dev and/or libebl-devel), but
> ubuntu looks don't have it.

It is there (apt-get builddep systemtap), but you can also use the
bundled-elfutils mode in the README, which uses a private source
tarball / build of elfutils.


> > #! /usr/bin/stap -g
> > probe kernel.function("vfs_readdir") {
> > ïprintln(%{ jiffies_64 %})
> > ïprintln($file$)
> > }
>
> parse error: expected literal string or number
> saw: embedded-code at ./1.sh:3:14
> source: println(%{ jiffies_64 %})

This particular script needs to be run with "stap -g" (guru mode)
because it uses embedded-C to access the jiffies_64 value instead of
debuginfo.


> > #! /usr/bin/stap
> > probe kernel.statement("*@fs/readdir.c:29") {
> > ïprintln($res)
> > }
> >
>
> semantic error: not accessible at this address: identifier '$res' at ./1.sh:3:14
> source: println($res)

That can happen if your line number is not quite right, or if you're
using a version of gcc prior to the VTA (better debuginfo for local
variables) code released in 4.5 (backported to 4.4 in Red Hat
distros). (More recent versions of systemtap may also help.)

If OTOH gdb can access the variable there but systemtap can't, then we
have a bug (and I'd appreciate your time helping collect some extra
data to help fix it).


- FChE
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/