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: Trying to get an embedded C function to use file I/O


On 08/16/2013 11:17 AM, Eric Wong wrote:
> 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...

Correct - the entire script runs in kernel mode, so any embedded-C you
add can only use kernel headers and functions.  This is not directly an
artifact of guru, really -- it's just that guru is required to let you
write embedded-c at all.  For your own good. :)

And you're also correct that --runtime=dyninst can use glibc, because in
this mode the script will be running as a plain shared library.  In
theory, you could use *any* header and library on your system, although
I don't think we currently give any way to add compiler flags.  You also
have to be aware of the process space though, e.g. a file you open() in
one process isn't going to be open in all involved processes.


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