From: "jlebon at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug translator/13296] inaccessible sdt.h operands of the form symbol(%reg)
Date: Mon, 05 May 2014 20:24:00 -0000 [thread overview]
Message-ID: <bug-13296-6586-T2BdYXrGZn@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-13296-6586@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=13296
Jonathan Lebon <jlebon at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jlebon at redhat dot com
--- Comment #4 from Jonathan Lebon <jlebon at redhat dot com> ---
The branch jlebon/pr13296 contains patches to support this now. More precisely,
we also pick up STT_OBJECT symbols from the symbol table, which we then try to
use if we meet such an operand.
Example:
$ cat prog.c
#include "sys/sdt.h"
int globalvar = 3;
int main(int argc, char **argv)
{
globalvar += argc;
STAP_PROBE1(test, mymark, globalvar);
return 0;
}
$ gcc prog.c -o prog -I../install/include -DSTAP_SDT_ARG_CONSTRAINT=m
$ readelf --notes prog | tail -n 7
Notes at offset 0x00001088 with length 0x0000004c:
Owner Data size Description
stapsdt 0x00000037 NT_STAPSDT (SystemTap probe
descriptors)
Provider: test
Name: mymark
Location: 0x000000000040050c, Base: 0x00000000004005b0, Semaphore:
0x0000000000000000
Arguments: -4@globalvar(%rip)
$ stap -e 'probe process.mark("mymark") { printf("globalvar is %d\n", $arg1) }'
-c ./prog
globalvar is 4
$
--
You are receiving this mail because:
You are the assignee for the bug.
next prev parent reply other threads:[~2014-05-05 20:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-14 12:15 [Bug translator/13296] New: " fche at redhat dot com
2011-10-14 12:29 ` [Bug translator/13296] " rrakus at fedoraproject dot org
2011-10-14 12:36 ` fche at redhat dot com
2011-10-14 13:56 ` sergiodj at redhat dot com
2011-10-18 13:18 ` mjw at redhat dot com
2011-12-01 2:51 ` fche at redhat dot com
2014-02-08 8:40 ` kalvdans at gmail dot com
2014-05-05 20:24 ` jlebon at redhat dot com [this message]
2014-05-09 20:39 ` jlebon 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-13296-6586-T2BdYXrGZn@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).