From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1983) id D4342384F01E; Wed, 13 Jul 2022 15:33:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D4342384F01E Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Carl Love To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Fix for gdb.base/stap-probe.c X-Act-Checkin: binutils-gdb X-Git-Author: Carl Love X-Git-Refname: refs/heads/master X-Git-Oldrev: 485caa08c024a1bc7e096819080c1e8214d5b960 X-Git-Newrev: 2b8b0dca3b6b9ad40e0c11754bf2f972bd8de890 Message-Id: <20220713153330.D4342384F01E@sourceware.org> Date: Wed, 13 Jul 2022 15:33:30 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2022 15:33:30 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D2b8b0dca3b6b= 9ad40e0c11754bf2f972bd8de890 commit 2b8b0dca3b6b9ad40e0c11754bf2f972bd8de890 Author: Carl Love Date: Wed Jul 13 15:30:43 2022 +0000 Fix for gdb.base/stap-probe.c =20 On PowePC, the test fails on a compile error: =20 /../binutils-gdb-current/gdb/testsuite/gdb.base/stap-probe.c:107:1: e= rror: expected '=3D', ',', ';', 'asm' or 'attribute' before 'use_xmm_reg' 107 | use_xmm_reg (int val) | ^~~~~~~~~~~ =20 Where the source code for stap-probe.c is: =20 static const char * __attribute__((noinline)) ATTRIBUTE_NOCLONE use_xmm_reg (int val) <-- line 107 { ... =20 The issue is the ATTRIBUTE_NOCLONE is not defined as an attribute as expected. The #define for ATTRIBUTE_NOCLONE can be found in ../lib/attributes.h. =20 This patch adds the missing include statement for the definition of ATTRIBUTE_NOCLONE. =20 The patch has been tested and verified on a Power10 system. Diff: --- gdb/testsuite/gdb.base/stap-probe.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdb/testsuite/gdb.base/stap-probe.c b/gdb/testsuite/gdb.base/s= tap-probe.c index d1482c35caf..527f7e187eb 100644 --- a/gdb/testsuite/gdb.base/stap-probe.c +++ b/gdb/testsuite/gdb.base/stap-probe.c @@ -15,6 +15,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . = */ =20 +#include "../lib/attributes.h" + #if USE_SEMAPHORES =20 #define _SDT_HAS_SEMAPHORES