From: Carl Love Date: Wed, 13 Jul 2022 15:30:43 +0000 (+0000) Subject: Fix for gdb.base/stap-probe.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2b8b0dca3b6b9ad40e0c11754bf2f972bd8de890;p=binutils-gdb.git Fix for gdb.base/stap-probe.c On PowePC, the test fails on a compile error: /../binutils-gdb-current/gdb/testsuite/gdb.base/stap-probe.c:107:1: error: expected '=', ',', ';', 'asm' or 'attribute' before 'use_xmm_reg' 107 | use_xmm_reg (int val) | ^~~~~~~~~~~ Where the source code for stap-probe.c is: static const char * __attribute__((noinline)) ATTRIBUTE_NOCLONE use_xmm_reg (int val) <-- line 107 { ... 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. This patch adds the missing include statement for the definition of ATTRIBUTE_NOCLONE. The patch has been tested and verified on a Power10 system. --- diff --git a/gdb/testsuite/gdb.base/stap-probe.c b/gdb/testsuite/gdb.base/stap-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 . */ +#include "../lib/attributes.h" + #if USE_SEMAPHORES #define _SDT_HAS_SEMAPHORES