From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94068 invoked by alias); 7 Jul 2016 21:14:35 -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 94058 invoked by uid 89); 7 Jul 2016 21:14:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*f:sk:914fe7f, H*i:sk:914fe7f, H*MI:sk:914fe7f X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 07 Jul 2016 21:14:32 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9F029C0624BC; Thu, 7 Jul 2016 21:14:30 +0000 (UTC) Received: from t540p.usersys.redhat.com ([10.15.1.231]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u67LET5C011682 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 7 Jul 2016 17:14:30 -0400 Subject: Re: SystemTap for Android - patchset To: Alexander Lochmann , Josh Stone , systemtap@sourceware.org References: <56e0c7f4-d317-f76b-5156-3569a6097b62@tu-dortmund.de> <577CF9A2.7050008@tu-dortmund.de> <41638913-446d-4b2e-7fab-cfdeeca6170a@redhat.com> <577E81DA.2@tu-dortmund.de> <3b77fcde-cf56-6c70-0c38-b1dbe7d5f37f@redhat.com> <914fe7f8-f8aa-63a1-7ff3-bea62a6a7301@tu-dortmund.de> From: David Smith Message-ID: <27ef4d79-281d-f7cc-2e98-433edc2256d8@redhat.com> Date: Thu, 07 Jul 2016 21:14:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <914fe7f8-f8aa-63a1-7ff3-bea62a6a7301@tu-dortmund.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-q3/txt/msg00029.txt.bz2 On 07/07/2016 03:52 PM, Alexander Lochmann wrote: > On 07.07.2016 19:39, David Smith wrote: >> OK, I'll believe you. However, your fix above still isn't correct. The >> whole point of autoconf-asm-syscall.c is to test if asm/syscall.h exists >> and is usable. If so, STAPCONF_ASM_SYSCALL_H will get defined. If >> autoconf-asm-syscall.c doesn't compile correctly, then >> STAPCONF_ASM_SYSCALL_H won't be defined. >> >> What needs to happen next here is for you to back out this change, >> recompile systemtap, then try to compile a few systemtap scripts. We'll >> need to see the errors to know what to fix. I'd guess we'll need to test >> STAPCONF_ASM_SYSCALL_H in some more places. > Ok. Here is the error message I get: > /tmp/stapE7HrAi/alexv9_src.c: In function > 'function___global__stp_syscall_nr__overload_0': > /tmp/stapE7HrAi/alexv9_src.c:7975:2: error: implicit declaration of > function '_stp_syscall_get_nr' > > I tested three scripts so far. All of them do not compile due to the > above error. > Do you need one of the scripts? Nope. One of the reasons we include is to get the kernel's syscall_get_nr() macros. If the kernel doesn't have a , we define our own versions of syscall_get_nr() in runtime/syscall.h. The arm platform already has our custom version of that macro in runtime/syscall.h. I'd guess we aren't including systemtap's runtime/syscall.h in the proper place. Here's a patch that might work: ==== diff --git a/tapset/linux/aux_syscalls.stp b/tapset/linux/aux_syscalls.stp index 110e6e9..2cc3cea 100644 --- a/tapset/linux/aux_syscalls.stp +++ b/tapset/linux/aux_syscalls.stp @@ -43,6 +43,8 @@ // Get _stp_val_array and _stp_lookup_* definitions. #include "linux/syscalls-common.h" +#include "syscall.h" + static void _stp_lookup_str2(const _stp_val_array * const array, long val, char *ptr, int len, int base) ==== -- David Smith dsmith@redhat.com Red Hat http://www.redhat.com 256.217.0141 (direct) 256.837.0057 (fax)