This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/13296] inaccessible sdt.h operands of the form symbol(%reg)
- From: "jlebon at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Mon, 05 May 2014 20:24:02 +0000
- Subject: [Bug translator/13296] inaccessible sdt.h operands of the form symbol(%reg)
- Auto-submitted: auto-generated
- References: <bug-13296-6586 at http dot sourceware dot 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.