From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14906 invoked by alias); 5 May 2014 20:24:10 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 14866 invoked by uid 48); 5 May 2014 20:24:05 -0000 From: "jlebon at redhat dot com" 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 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: translator X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jlebon at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-q2/txt/msg00107.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=13296 Jonathan Lebon changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jlebon at redhat dot com --- Comment #4 from Jonathan Lebon --- 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.