Is there a way to tell stap where to find include headers?

Frank Ch. Eigler fche@redhat.com
Fri Mar 8 03:02:00 GMT 2019


Hi -

On Fri, Mar 08, 2019 at 02:55:11AM +0000, Lan, Jay wrote:
> In the exmaple you mentioned
>     @cast(ptr, "typename", "kernel</path/to/header>")->field

> I assume 'kernel' tells stap to look at /lib/modules/<uname-r>/build/include/.

That's a good guess, but not quite.  It tells stap to invoke the
kernel build compiler / cflags to process the given header.  There
is an implicit "-Ipath" there, but that doesn't apply to /full/path names.

> But for external kernel modules such as mofed, how can I tell stap
> what other location to look at? The mofed headers are installed to
> /usr/src/ofa_kernel/.../include/.

Have you tried @cast(ptr,"foobar","kernel</usr/src/ofa..../include/foo.h")  ?

- FChE



More information about the Systemtap mailing list