From patchwork Tue Feb 25 13:15:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Machado X-Patchwork-Id: 183833 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp1738606ile; Tue, 25 Feb 2020 05:15:50 -0800 (PST) X-Google-Smtp-Source: APXvYqzjjB89pCRgaFcxeybiaCuUq7+LoPNaDt2k+q1BzMb3IwIXMGxfSvTjkqEmBiKItzBYFO+h X-Received: by 2002:a05:6808:4c7:: with SMTP id a7mr3502504oie.83.1582636549997; Tue, 25 Feb 2020 05:15:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582636549; cv=none; d=google.com; s=arc-20160816; b=ctf7Y0vuzPtq0dQWceUuaqRwarJh1TlHEIvuegGhW/iYMvsySvthToELssswFraTa/ aI/tFph77ms9NY8Mfy3YNbckfmoInoZciCtcs9Tg4OCOf7Pbla5j9N7eF1JagBiVUzPI Qyn0j26ITx3PagLyAiWPimT3RcCPXEDTtMXx3XdVHrn3choS6uRAPFzleiUi+E3ax/8q g85zZD8zUA8DU68blRvWX3pwXkYiFeR7qKMwCZf7Ap+bvWHXSOGT3+ZugpJsgyMQOktc /9JoON0ZlyOoOJ+GMGb73PI2XFxLjiS5LR7Q97Vs0DeVP74XydjwXt/NXeigq3FbU755 BU4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature:delivered-to :sender:list-help:list-post:list-archive:list-subscribe :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature; bh=woXrhJPowB9rfRRUBnS6MlDHZIfBOGRComY/0Bm0MdE=; b=0h4fh7bZwSnenObcMDI1+7LtUUpV8c4gwROcIEeHB8uxZ+C9qvH5SLsZkk6RuYAf1v fICNYW54wGQUOKNNPSLVnsiWIJqCwbDEjROUC9w7u2v5MDBtWeFsJBm9T0Jx4fMAyTOT AyUgz50SW/qDUUgaR5IvwMsJydOshqh6BSm47gCYGeeJg9udCg5HbKTwDifEEGmKoVsl SUes+1gRUF2UxPa7SbeB+MaUFEbhBkYfJd3PxXn11nkYrrQCC1iMdUo5GbcxyafgoKpC rn2cb7o48ReikxgDqjZjwOwZk/szsLlakPbu6tf1lly0jiEJmULUb7qfBx4KArjqdx9p /dwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=kcmLenmi; dkim=pass header.i=@linaro.org header.s=google header.b=w4GAc1VK; spf=pass (google.com: domain of gdb-patches-return-164647-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gdb-patches-return-164647-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id r6si8187758otn.216.2020.02.25.05.15.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Feb 2020 05:15:49 -0800 (PST) Received-SPF: pass (google.com: domain of gdb-patches-return-164647-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=kcmLenmi; dkim=pass header.i=@linaro.org header.s=google header.b=w4GAc1VK; spf=pass (google.com: domain of gdb-patches-return-164647-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gdb-patches-return-164647-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; q=dns; s= default; b=ZZIcRRPjDBkyG2imVulJ2Qzuel4vEswu7m0NVGaT4Ylgldkri4Uqu 9ZltnZjGvs/s3pFcOZsMtL7A3gDMaUVYotSzsIwd6Ut7AwDycXfejyIw9rXWQUkM 51gIgAnbWhdHLxdWoj4bWzXzR5Wj1CQCrzCIifQYDPEmW9BXDb927E= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; s=default; bh=viDjUDwrvMRNPTMBfVhC4RNiNJI=; b=kcmLenmiB5Gjf28RodUBAEksHcFt 4vUcUY1jtMDOdpCYGUqKXIWlICOf9bcfB/BBFuSUXB8dJ0G9qNu6mSyAJjNNywlh hzKH58Tmopbwj7DguVdFlvG6JPVa5JyKl46GWQ2aFYcIu8hQ8eyPtHOixi4qDx88 ZysTaq5PWNMueME= Received: (qmail 7841 invoked by alias); 25 Feb 2020 13:15:44 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 7833 invoked by uid 89); 25 Feb 2020 13:15:43 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:2572, H*RU:209.85.160.193, HX-Spam-Relays-External:209.85.160.193 X-HELO: mail-qt1-f193.google.com Received: from mail-qt1-f193.google.com (HELO mail-qt1-f193.google.com) (209.85.160.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 25 Feb 2020 13:15:42 +0000 Received: by mail-qt1-f193.google.com with SMTP id g21so8968127qtq.10 for ; Tue, 25 Feb 2020 05:15:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=woXrhJPowB9rfRRUBnS6MlDHZIfBOGRComY/0Bm0MdE=; b=w4GAc1VKShD+O2VduMpWVdwJE32E0ef1Nf4qHFQUAGzCGiLJfnjpgIT4COPx9MmDS5 rU6+RbPXAySjGTkKDhA40cVW3GxgpZCRpH5vKuxCo+EidIV5e+RanilCHdXeMwHlxi1y xbSKEOXMIWsC3mQ3q42U95ZkzTBmCT7zulMwJSrcPd7kFKHxABEsnKc9DTTTeU5vTb/G i/0PN+8sobqtSQqQmGr3XacBDVcTWvVS3cwwtw3Vaw+sURdiUHAk7j6uQ9PgdlbB5D3L K/3X9hCVdSZeoMLw68IIamFyHNAhXn0CH0gTtxmP+1tg5JlOK8YtVOxvTADvmiDqyl1b J7rQ== Return-Path: Received: from localhost.localdomain ([191.34.86.53]) by smtp.gmail.com with ESMTPSA id 3sm7685807qte.59.2020.02.25.05.15.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 05:15:38 -0800 (PST) From: Luis Machado To: gdb-patches@sourceware.org Cc: Alan.Hayward@arm.com Subject: [PATCH] Fix gdb.arch/aarch64-dbreg-contents.exp build failures Date: Tue, 25 Feb 2020 10:15:32 -0300 Message-Id: <20200225131532.5796-1-luis.machado@linaro.org> X-IsSubscribed: yes I ran into the following failures when running tests under QEMU: -- gdb compile failed, binutils-gdb/gdb/testsuite/gdb.arch/aarch64-dbreg-contents.c: In function 'set_watchpoint': binutils-gdb/gdb/testsuite/gdb.arch/aarch64-dbreg-contents.c:41:29: error: storage size of 'dreg_state' isn't known struct user_hwdebug_state dreg_state; ^~~~~~~~~~ In file included from /usr/include/aarch64-linux-gnu/bits/types/struct_iovec.h:23:0, from /usr/include/aarch64-linux-gnu/sys/uio.h:23, from binutils-gdb/gdb/testsuite/gdb.arch/aarch64-dbreg-contents.c:17: binutils-gdb/gdb/testsuite/gdb.arch/aarch64-dbreg-contents.c:69:18: error: invalid use of undefined type 'struct user_hwdebug_state' iov.iov_len = (offsetof (struct user_hwdebug_state, dbg_regs) ^ binutils-gdb/gdb/testsuite/gdb.arch/aarch64-dbreg-contents.c:74:5: warning: implicit declaration of function 'error'; did you mean 'errno'? [-Wimplicit-function-declaration] error (1, errno, "PTRACE_SETREGSET: NT_ARM_HW_WATCH"); ^~~~~ errno binutils-gdb/gdb/testsuite/gdb.arch/aarch64-dbreg-contents.c: In function 'main': binutils-gdb/gdb/testsuite/gdb.arch/aarch64-dbreg-contents.c:87:3: warning: implicit declaration of function 'atexit'; did you mean '_Exit'? [-Wimplicit-function-declaration] atexit (cleanup); ^~~~~~ _Exit binutils-gdb/gdb/testsuite/gdb.arch/aarch64-dbreg-contents.c:89:11: warning: implicit declaration of function 'fork' [-Wimplicit-function-declaration] child = fork (); ^~~~ -- The following patch fixes those by adding the necessary include files. With that said, the test doesn't pass at present. I'll have to investigate it a bit more. gdb/testsuite/ChangeLog: 2020-02-25 Luis Machado * gdb.arch/aarch64-dbreg-contents.c: Include stdlib.h, unistd, asm/ptrace.h and error.h. Signed-off-by: Luis Machado --- gdb/testsuite/gdb.arch/aarch64-dbreg-contents.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.17.1 diff --git a/gdb/testsuite/gdb.arch/aarch64-dbreg-contents.c b/gdb/testsuite/gdb.arch/aarch64-dbreg-contents.c index 66ca76f847..ca690f63de 100644 --- a/gdb/testsuite/gdb.arch/aarch64-dbreg-contents.c +++ b/gdb/testsuite/gdb.arch/aarch64-dbreg-contents.c @@ -9,13 +9,17 @@ freely. */ #define _GNU_SOURCE 1 +#include +#include #include +#include #include #include #include #include #include #include +#include static pid_t child;