From: Simon Marchi <simon.marchi@polymtl.ca>
To: Alan Hayward <Alan.Hayward@arm.com>
Cc: Richard Bunt <Richard.Bunt@arm.com>,
gdb-patches@sourceware.org, nd <nd@arm.com>,
Dirk Schubert <Dirk.Schubert@arm.com>
Subject: Re: [PING] [PATCH] Enable hardware watchpoints on attach for aarch64
Date: Tue, 12 Jun 2018 01:38:00 -0000 [thread overview]
Message-ID: <942ba9f74d67b3857396d461353aae1a@polymtl.ca> (raw)
In-Reply-To: <BDFF5B49-0B39-475D-A7BD-2B330513866A@arm.com>
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
next prev parent reply other threads:[~2018-06-12 1:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-23 10:32 Richard Bunt
2018-06-07 8:54 ` [PING] " Richard Bunt
2018-06-07 13:19 ` Alan Hayward
2018-06-12 1:38 ` Simon Marchi [this message]
2018-06-18 14:41 ` Richard Bunt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=942ba9f74d67b3857396d461353aae1a@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=Alan.Hayward@arm.com \
--cc=Dirk.Schubert@arm.com \
--cc=Richard.Bunt@arm.com \
--cc=gdb-patches@sourceware.org \
--cc=nd@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox