This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Trying to get an embedded C function to use file I/O
- From: Eric Wong <normalperson at yhbt dot net>
- To: Jeff Johnston <jjohnstn at redhat dot com>
- Cc: systemtap at sourceware dot org
- Date: Fri, 16 Aug 2013 18:17:32 +0000
- Subject: Re: Trying to get an embedded C function to use file I/O
- References: <520E645A dot 9080305 at redhat dot com>
Jeff Johnston <jjohnstn@redhat.com> wrote:
> I'm trying to use regular C I/O in an embedded C function for
> SystemTap. When I try and do:
>
> %{
> #include <stdio.h>
> %}
>
> I get an error that SystemTap cannot find stdio.h. I am using -g
> for guru mode.
>
> Is there some form of restriction on C stdio?
I think guru mode runs the code in kernel space. I tried using
strftime() the other day and could not. Maybe dyninst lets one use
glibc, I haven't looked into it more...
(disclaimer: I'm no systemtap expert)