From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22403 invoked by alias); 12 Sep 2018 15:03:16 -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 22366 invoked by uid 48); 12 Sep 2018 15:03:14 -0000 From: "wcohen at redhat dot com" To: systemtap@sourceware.org Subject: [Bug translator/23634] WARNING: Can't parse SDT_V3 operand for x86_64 qemu tapset probe points Date: Wed, 12 Sep 2018 15:03: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: wcohen at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2018-q3/txt/msg00172.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D23634 --- Comment #3 from William Cohen --- sdt.h makes a special case for powerpc: # ifndef STAP_SDT_ARG_CONSTRAINT # if defined __powerpc__ # define STAP_SDT_ARG_CONSTRAINT nZr # else # define STAP_SDT_ARG_CONSTRAINT nor # endif # endif This was added by: commit 50f2ef5be3c24b3fe9eb4c9abc386d8dbc3b953a Author: Sandipan Das Date: Thu Oct 5 14:39:41 2017 +0530 powerpc: Change SDT argument constraint With the 'o' memory constraint, any memory operand which has an offsettable address is allowed. However, for some architectures such as powerpc, this allows operands like the ones shown below in the readelf output from Fedora 26 to be generated. $ readelf -n /lib64/libc.so.6 | grep memory_mallopt_mmap_max -A2 -B2 stapsdt 0x0000006c NT_STAPSDT (SystemTap probe descriptors) Provider: libc Name: memory_mallopt_mmap_max Location: 0x00000000000a0274, Base: 0x00000000001ccb90, Semaphore: 0x0000000000000000 Arguments: -4@9 -4@.LANCHOR0+44@toc@l(8) -4@.LANCHOR0+52@toc@l(7) The second and third argument shown above are both having operands which are pointers to static data anchors. Since these static anchors are not included in the symbol table, they cannot be resolved from the binary itself. So, such arguments cannot be read via their corresponding markers. Using the 'Z' memory constraint instead solves this issue as it will only allow a memory operand that is an indexed or indirect from a register. So, for powerpc, we set STAP_SDT_ARG_CONSTRAINT to 'nZr' but keep it as 'nor' for all other architectures. Signed-off-by: Sandipan Das --=20 You are receiving this mail because: You are the assignee for the bug.