public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Josh Stone <jistone@redhat.com>
To: Eric Wong <normalperson@yhbt.net>
Cc: Jeff Johnston <jjohnstn@redhat.com>, systemtap@sourceware.org
Subject: Re: Trying to get an embedded C function to use file I/O
Date: Mon, 19 Aug 2013 19:11:00 -0000	[thread overview]
Message-ID: <52126DC3.7070707@redhat.com> (raw)
In-Reply-To: <20130816181732.GA6552@dcvr.yhbt.net>

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.

  reply	other threads:[~2013-08-19 19:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-16 17:41 Jeff Johnston
2013-08-16 18:17 ` Eric Wong
2013-08-19 19:11   ` Josh Stone [this message]
2013-08-17 23:48 ` Frank Ch. Eigler
2013-08-19 16:38   ` Jeff Johnston
2013-08-19 22:02     ` Frank Ch. Eigler
2013-08-21 21:24       ` Jeff Johnston

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52126DC3.7070707@redhat.com \
    --to=jistone@redhat.com \
    --cc=jjohnstn@redhat.com \
    --cc=normalperson@yhbt.net \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).