[Bug translator/13296] inaccessible sdt.h operands of the form symbol(%reg)
jlebon at redhat dot com
sourceware-bugzilla@sourceware.org
Mon May 5 20:24:00 GMT 2014
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.
More information about the Systemtap
mailing list