public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "mcermak at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug runtime/17362] no script-level local variables available in F20's kernel.function("do_execve")
Date: Tue, 09 Sep 2014 15:19:00 -0000	[thread overview]
Message-ID: <bug-17362-6586-k1aAwQPg62@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-17362-6586@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=17362

--- Comment #3 from Martin Cermak <mcermak at redhat dot com> ---
Very similar issue affecting at_var.exp. Old kernel:

=====
# rpm -q systemtap; uname -r
systemtap-2.7-1.mcermak.e454243.fc20.x86_64
3.13.9-200.fc20.x86_64
# cat systemtap.base/at_var.c
#include <sys/time.h>

struct foo
{
  int bar;
};

static struct foo foo;

void sub(const char *file)
{
  struct timeval times[2];
  times[0].tv_sec = 1;
  times[0].tv_usec = 2;
  times[1].tv_sec = 3;
  times[1].tv_usec = 4;
  utimes (file, times);
  foo.bar -= 2; /* 40 */
}

int
main (int argc, char **argv)
{
  foo.bar = 41 + argc; /* 42 */
  sub(argv[0]);
  return 0;
}
# gcc -g systemtap.base/at_var.c
# stap -e 'probe kernel.function("SYSC_utimes") {println($utimes$$,
$utimes[1]$$, @var("utimes")$$, @var("utimes")[1]$$)}' -c ./a.out 
{.tv_sec=1, .tv_usec=2}{.tv_sec=3, .tv_usec=4}{.tv_sec=1,
.tv_usec=2}{.tv_sec=3, .tv_usec=4}
#
=====

new kernel:

=====
# rpm -q systemtap; uname -r
systemtap-2.7-1.mcermak.e454243.fc20.x86_64
3.15.10-201.fc20.x86_64
# gcc -g systemtap.base/at_var.c
# stap -e 'probe kernel.function("SYSC_utimes") {println($utimes$$,
$utimes[1]$$, @var("utimes")$$, @var("utimes")[1]$$)}' -c ./a.out
{.tv_sec=?, .tv_usec=?}{.tv_sec=?, .tv_usec=?}{.tv_sec=?,
.tv_usec=?}{.tv_sec=?, .tv_usec=?}
#
=====

-- 
You are receiving this mail because:
You are the assignee for the bug.

  parent reply	other threads:[~2014-09-09 15:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-08 15:15 [Bug runtime/17362] New: " mcermak at redhat dot com
2014-09-08 15:34 ` [Bug runtime/17362] " fche at redhat dot com
2014-09-08 18:38 ` jistone at redhat dot com
2014-09-09 15:19 ` mcermak at redhat dot com [this message]
2014-10-06 21:12 ` fche at redhat dot com

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=bug-17362-6586-k1aAwQPg62@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --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).