This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]