From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 76106 invoked by alias); 13 Feb 2019 21:57:03 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 76005 invoked by uid 89); 13 Feb 2019 21:57:02 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*UA:6.1, H*u:6.1 X-HELO: userp2120.oracle.com Received: from userp2120.oracle.com (HELO userp2120.oracle.com) (156.151.31.85) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 13 Feb 2019 21:57:00 +0000 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x1DLrjsb003284; Wed, 13 Feb 2019 21:56:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=epzv7qmxZTUK6NIyPudUeaUAg79HYMplu00WhZw1XU0=; b=aw05ixHahkFuYcFQTQru5lqr21iis2aSZ0EcFFon28l06c+WYQ7w0z9fOph4uklxYJPe CC46RmKk+szSP9OXKdPuSG9MQsd+J812XayDWXt0RmhN/C21OqyIUkrZWIfG/fx5d2GE Iz73RZvGuFAxCZIwPu5igYBpQ2ho0AK1ElBJ5nVkxy5NmPtyEB+TBJ9otHRYQGxgUY6/ iyorcCNZzDnOmZ4T3yfk0WXu7nfZyVh4ztVxYWpDnu3+nlrfuE936l8xRQGO8tD2msOW cOroPkhJz325uGoYa+ZOwP/PJhQzGSVpmoEZfz1Nz0PSFeoCkigxR1c6Tf4w4IGqpmx8 DQ== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2qhree4prw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Feb 2019 21:56:53 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x1DLulwe022221 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Feb 2019 21:56:47 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x1DLukrS007904; Wed, 13 Feb 2019 21:56:46 GMT Received: from [10.159.230.252] (/10.159.230.252) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 13 Feb 2019 21:56:46 +0000 Subject: Re: [PING][PATCH v2 PR gdb/21870] aarch64: Leftover uncleared debug registers To: Pedro Alves , Alan Hayward Cc: "gdb-patches@sourceware.org" , nd References: <1530148222-12558-1-git-send-email-weimin.pan@oracle.com> <145f2e8d-4321-00a6-650a-bf8f0a483b6f@oracle.com> <7861E9FA-0293-4C16-857A-6935579C7042@arm.com> <3eea53e4-dfc6-ef59-f88f-d35797c26ba6@oracle.com> <31396591-A287-40C5-A4D0-6EAEC8077D6B@arm.com> <563997a0-cd3c-cf6e-8418-bbd452436b2b@oracle.com> <037877d7-a3d3-7ae1-cafa-0bd29927abb2@redhat.com> From: Wei-min Pan Message-ID: <3fc1501e-cbf7-7d92-e5a2-8a3ccd4e332e@oracle.com> Date: Wed, 13 Feb 2019 21:57:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <037877d7-a3d3-7ae1-cafa-0bd29927abb2@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2019-02/txt/msg00210.txt.bz2 On 2/13/2019 3:40 AM, Pedro Alves wrote: > On 02/12/2019 01:10 AM, Weimin Pan wrote: >> +clean_restart $testfile >> + >> +set test "run to exit" >> +gdb_test_multiple "run" "$test" { >> + -re "exited with code 01.*$gdb_prompt $" { >> + pass "$test" >> + } >> + -re "exited normally.*$gdb_prompt $" { >> + pass "$test" >> + } >> +} > A naked "run" command doesn't work when testing against > gdbserver with --target_board=native-gdbserver. > > Is "run" important here? Could this use runto_main + "continue" instead? As long as the test run doesn't assert, we could instead use "runto_main + "continue". Thanks for pointing this out. > Also, the comment at the top of the file says: > > # This test checks that GDB does not alter watchpoints set by an inferior. > # It sets a watchpoint on memory then writes to the watched memory. > # It will exit with 1 if the watchpoint is not reached. > > But I couldn't spot where that "exit with 1" happens in the .c file. You are right, it should be "exit with 2". > Also, when that happens, we're issuing a pass, as seen above. > Is that intended? "Exit with 1" could happen if the PTRACE_SETREGSET call should fail which is ok as long as it doesn't cause assertion. Thanks for your comments. > > Thanks, > Pedro Alves