From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 82280 invoked by alias); 12 Jun 2018 01:38:09 -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 82268 invoked by uid 89); 12 Jun 2018 01:38:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,KAM_NUMSUBJECT,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 spammy=columns, HContent-Transfer-Encoding:8bit X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Jun 2018 01:38:07 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id w5C1c1aZ023826 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 11 Jun 2018 21:38:05 -0400 Received: by simark.ca (Postfix, from userid 112) id 14D6D1EF29; Mon, 11 Jun 2018 21:38:01 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id D52231E481; Mon, 11 Jun 2018 21:37:59 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Tue, 12 Jun 2018 01:38:00 -0000 From: Simon Marchi To: Alan Hayward Cc: Richard Bunt , gdb-patches@sourceware.org, nd , Dirk Schubert Subject: Re: [PING] [PATCH] Enable hardware watchpoints on attach for aarch64 In-Reply-To: References: <17719981-eb06-6e22-6d3e-6bfe6ae411ba@arm.com> <3832a623-3a34-2574-5b86-bba9e9728fb8@arm.com> Message-ID: <942ba9f74d67b3857396d461353aae1a@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.6 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Tue, 12 Jun 2018 01:38:01 +0000 X-IsSubscribed: yes X-SW-Source: 2018-06/txt/msg00300.txt.bz2 On 2018-06-07 09:19, Alan Hayward wrote: > Aarch64 changes look good to me. > I’m not up to speed enough with .exp files to comment on that part. > I tested it on an aarch64 box, and it works fine for me. Hi, I looked at the test, if Alan is fine with the code changes then I am fine with them. I noted some nits, but otherwise it looks good. Please push after addressing them. >>> +# Get the PID of the test process. >>> +set testpid "" >>> +set test "get inferior process ID" >>> + gdb_test_multiple "p mypid" $test { >>> + -re " = ($decimal)\r\n$gdb_prompt $" { >>> + set testpid $expect_out(1,string) >>> + pass $test >>> + } >>> +} You can use get_integer_valueof for this. >>> +set test "attach $testpid" >>> +gdb_test_multiple $test $test { >>> + -re "Attaching to program.*process $testpid\r\n.*$gdb_prompt $" >>> { >>> + pass "$test" >>> + } >>> + timeout { >>> + fail "$test" >>> + } >>> +} Just wondering, can't simple gdb_test be used here? >>> + >>> +gdb_test_no_output "set should_continue = 1" >>> +# Ensure the test program is in the top frame so the required >>> +# variables are in scope. >>> +gdb_breakpoint [gdb_get_line_number "prewatchtrigger"] >>> +gdb_continue_to_breakpoint "prewatchtrigger" >>> + >>> +gdb_test "watch watched_variable" \ >>> + "Hardware watchpoint $decimal: watched_variable" >>> + >>> +gdb_test "continue" \ >>> + "continue.*Continuing.*\.Hardware watchpoint $decimal:\ >>> + watched_variable.*Old value = 0.*New value = 4.*" 8 spaces -> tab on the last line. Though for test patterns, it's fine to go over 80 columns, IMO. Simon