From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114662 invoked by alias); 7 Feb 2020 04:07:30 -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 114652 invoked by uid 89); 7 Feb 2020 04:07:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy=H*Ad:U*systemtap, HTo:U*systemtap, bg, 1544 X-HELO: esa13.fujitsucc.c3s2.iphmx.com Received: from esa13.fujitsucc.c3s2.iphmx.com (HELO esa13.fujitsucc.c3s2.iphmx.com) (68.232.156.96) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 07 Feb 2020 04:07:27 +0000 IronPort-SDR: UjI6eBdwN0UuJaFbVnNb9BWIlUry3FLWIpWrHtieNytq12Djz5m04T0nNxusjkMVUWETI7hEOi smR94qpuRQKbN6Z9tDqjFRxo7PoafyExXpCRRk1RcO2FNeGWfJNIicFKsXLAoN3PIwMNNh/DJH /T7sjpqJXYRTRL+oTYb/KcvXbBUxHmHVB4kz4OqGFDeNsQMMMUqcn/yyOUotRcicWmknblS5bP 3l0m1cd/sUIeoShsmPHiPJhddQ2S0NbPeeDMQN4dswXJjqHkDph8ujdVmXo9yQQgIrgMi9lv2P k+8= Received: from mail-ty1jpn01lp2051.outbound.protection.outlook.com (HELO JPN01-TY1-obe.outbound.protection.outlook.com) ([104.47.93.51]) by ob1.fujitsucc.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Feb 2020 13:07:24 +0900 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HQT4oKHry3ScNwVHubm4YaSt5nTCG2hoIw9pjGNYrHL6vX50cvrZ4xP2IVNiBHNcjM/bgsNTnots3EXo++VedzIdQ0LwK5ddSMV2cNwu2Kaw2HbWEAQ78yHNHgauNN7kWFFYmXYjNA/XD4IG3zftlmq7GQ8YK55WmvJ6u1LbHndMnGpcXl2BeKe1h+UU5/3W5NcKEWtr6HsUDiz+a4OeUDqhQdggoH3NWMaSzwxJKDB6bqLcyyVETNoMGdTfvx4wy4AClYAx37C8AGWEWbit/k8Meh+vOazeUqSMQxc1sb5t2z5m3C6A9n2wIAFlRCQ2bF0C3ZdM7SScEyme5md4Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M7cpjjIewjm5ptFB8ay8FJ/9ys+osZ6DY3dP/CcxPB0=; b=Py+py5RnZPWI72iFSFwFh9XqJvI8dyawFUSiZeNGfKYb5gpRxVyADwAKf51lWBnme7gmTYOnVmXlawxBvSnWXeJ82jYi9ZjEx7UHI80NZM5ghtRghYzOwr2Ao5uYAEtWFuMcLsjlavsHxa6eQ7Yy5Q5Mdu44qwGadWBsIbXvE96NyI9tvWvkv3+/CfFmfQWSnDJG3e3V8Z/fmHcmm30qqmvEDETsM0HQNUb4UC0CktobP6JFESxejT7vSM+v/YV6NhIeUzzUlbDYoq9wkdeem9peuNA3AOFyzwyqNcFAR+vRoVDj6YHqNDNCfnBNX6zdz2pGWTOa3/TnzgDGbsX48g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=fujitsu.com; dmarc=pass action=none header.from=fujitsu.com; dkim=pass header.d=fujitsu.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fujitsu.onmicrosoft.com; s=selector2-fujitsu-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M7cpjjIewjm5ptFB8ay8FJ/9ys+osZ6DY3dP/CcxPB0=; b=dGxcX/1PAI0X5M7SwNV0yuJzSkXatYKOQ5bezyMhqghqscwIFgPVJtbfggn5TapCnrprDJEsCifs2F50X2fK//vjrkZzvcSPNiNLiG1I/ZwAGA4hSSZti/wSze7sP85Ks8zZ3uD8sToSa5vhgowQTUaAjD80zCxzG7GKlRrcDmM= Received: from OSBPR01MB4006.jpnprd01.prod.outlook.com (20.178.98.151) by OSBPR01MB4056.jpnprd01.prod.outlook.com (20.178.99.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2707.21; Fri, 7 Feb 2020 04:07:21 +0000 Received: from OSBPR01MB4006.jpnprd01.prod.outlook.com ([fe80::1c51:734d:bcc3:8626]) by OSBPR01MB4006.jpnprd01.prod.outlook.com ([fe80::1c51:734d:bcc3:8626%5]) with mapi id 15.20.2707.020; Fri, 7 Feb 2020 04:07:21 +0000 From: "d.hatayama@fujitsu.com" To: "'systemtap@sourceware.org'" Subject: [PATCH] loc2c-runtime: fix compilation failure Date: Fri, 07 Feb 2020 04:07:00 -0000 Message-ID: authentication-results: spf=none (sender IP is ) smtp.mailfrom=d.hatayama@fujitsu.com; x-ms-oob-tlc-oobclassifiers: OLM:989; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-messagedata: O9m4CzOUzit/zee7zmv0qAA9KtzLf8gmpL/vmRklShjN8lNtZtpXiQN7fXSNvsjTEd1YM+lNcv6ELBMs16MjR6EjpRomWEBLCgTm1y/ffVpcQB8uLiW9ZHT76gyBJ2XInGQggJqGV5jXQnYBxAOdJQ== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: QZaUR/p4ddLb4iQrT1XQSqPktPcb/eJFYqnXsDKw+cqvlyH6hpSsA6ICroIZyFaHEBA+D29ojly6pz/jYmEXQLPXhI5OVlm/Ceni7W36PsA= X-SW-Source: 2020-q1/txt/msg00011.txt I ran into the following compilation failure when I tried to change $return in a return probe for some user-space process: # ./runstap.sh Pass 1: parsed user script and 478 library scripts using 238944virt/810= 96res/12424shr/68276data kb, in 790usr/230sys/1187real ms. Pass 2: analyzed script: 3 probes, 6 functions, 1 embed, 2 globals usin= g 255944virt/99036res/13544shr/85276data kb, in 300usr/70sys/449real ms. Pass 3: translated to C into "/tmp/stapnWDsqi/stap_ea515d442eab2d1921c7= 105860f0337f_3673_src.c" using 255944virt/99364res/13872shr/85276data kb, i= n 270usr/430sys/716real ms. In file included from /usr/share/systemtap/runtime/linux/runtime.h:217, from /usr/share/systemtap/runtime/runtime.h:26, from /tmp/stapnWDsqi/stap_ea515d442eab2d1921c7105860f0337f_3673_src.= c:27: /tmp/stapnWDsqi/stap_ea515d442eab2d1921c7105860f0337f_3673_src.c: In fu= nction =1B$B!F=1B(Bfunction___private___foobar_stp__dwarf_tvar_set_return_1= =1B$B!G=1B(B: /usr/share/systemtap/runtime/linux/loc2c-runtime.h:297:69: error: =1B$B= !F=1B(Bregnoo=1B$B!G=1B(B undeclared (first use in this function); did you = mean =1B$B!F=1B(Breg_info=1B$B!G=1B(B? #define u_store_register(regno,value) check_store_register(c->uregs,re= gnoo,_stp_is_compat_task()?ARRAY_SIZE(url_i386):ARRAY_SIZE(url_x86_64),valu= e,uu_store_register) ^~~~~~ /usr/share/systemtap/runtime/linux/loc2c-runtime.h:44:23: note: in defi= nition of macro =1B$B!F=1B(Bcheck_store_register=1B$B!G=1B(B if ((regs) =3D=3D 0 || (regno) < 0 || (regno) > (maxregno)) { \ ^~~~~ /tmp/stapnWDsqi/stap_ea515d442eab2d1921c7105860f0337f_3673_src.c:725:3:= note: in expansion of macro =1B$B!F=1B(Bu_store_register=1B$B!G=1B(B u_store_register(0, l->__tmp0); ^~~~~~~~~~~~~~~~ /usr/share/systemtap/runtime/linux/loc2c-runtime.h:297:69: note: each u= ndeclared identifier is reported only once for each function it appears in #define u_store_register(regno,value) check_store_register(c->uregs,re= gnoo,_stp_is_compat_task()?ARRAY_SIZE(url_i386):ARRAY_SIZE(url_x86_64),valu= e,uu_store_register) ^~~~~~ /usr/share/systemtap/runtime/linux/loc2c-runtime.h:44:23: note: in defi= nition of macro =1B$B!F=1B(Bcheck_store_register=1B$B!G=1B(B if ((regs) =3D=3D 0 || (regno) < 0 || (regno) > (maxregno)) { \ ^~~~~ /tmp/stapnWDsqi/stap_ea515d442eab2d1921c7105860f0337f_3673_src.c:725:3:= note: in expansion of macro =1B$B!F=1B(Bu_store_register=1B$B!G=1B(B u_store_register(0, l->__tmp0); ^~~~~~~~~~~~~~~~ make[1]: *** [scripts/Makefile.build:312: /tmp/stapnWDsqi/stap_ea515d44= 2eab2d1921c7105860f0337f_3673_src.o] Error 1 make: *** [Makefile:1544: _module_/tmp/stapnWDsqi] Error 2 WARNING: kbuild exited with status: 2 Pass 4: compiled C into "stap_ea515d442eab2d1921c7105860f0337f_3673.ko"= in 46720usr/15990sys/64098real ms. Pass 4: compilation failed. [man error::pass4] This failure is caused by a typo of the name of an argument variable of macro u_store_register introduced at the commit a03b455bc656216a4829dbad08e630949d944c75. --- runtime/linux/loc2c-runtime.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/linux/loc2c-runtime.h b/runtime/linux/loc2c-runtime.h index b4a329b..0270fa1 100644 --- a/runtime/linux/loc2c-runtime.h +++ b/runtime/linux/loc2c-runtime.h @@ -294,7 +294,7 @@ static void ursl_store64 (const struct usr_regset_lut* = lut,unsigned lutsize, in #define uu_store_register(_regs,regno,value) (_stp_is_compat_task() ? urs= l_store32(url_i386, ARRAY_SIZE(url_i386), EM_386, regno, value) : ursl_stor= e64(url_x86_64, ARRAY_SIZE(url_x86_64), EM_X86_64, regno, value)) =20 #define u_fetch_register(regno) check_fetch_register(c->uregs,regno,_stp_i= s_compat_task()?ARRAY_SIZE(url_i386):ARRAY_SIZE(url_x86_64),uu_fetch_regist= er) -#define u_store_register(regno,value) check_store_register(c->uregs,regnoo= ,_stp_is_compat_task()?ARRAY_SIZE(url_i386):ARRAY_SIZE(url_x86_64),value,uu= _store_register) +#define u_store_register(regno,value) check_store_register(c->uregs,regno,= _stp_is_compat_task()?ARRAY_SIZE(url_i386):ARRAY_SIZE(url_x86_64),value,uu_= store_register) =20 #endif =20 --=20 1.8.3.1