This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Prevent turning record on while threads are running (PR 20869)
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: Luis Machado <lgustavo at codesourcery dot com>, <gdb-patches at sourceware dot org>
- Cc: <markus dot t dot metzger at intel dot com>
- Date: Tue, 29 Nov 2016 11:42:03 -0500
- Subject: Re: [PATCH] Prevent turning record on while threads are running (PR 20869)
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=simon dot marchi at ericsson dot com;
- References: <20161129150758.29912-1-simon.marchi@ericsson.com> <fef2bdd4-d5c8-14a8-73ed-329b27961f1b@codesourcery.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 16-11-29 10:58 AM, Luis Machado wrote:
>> +if ![supports_reverse] {
>
> Add an explicit untested call here?
Right, adding:
untested "reverse debugging not supported"
>> +proc test_record_while_running { } {
>> + gdb_test "continue &" "Continuing."
>> + gdb_test "record" "Can't enable record while the program is running. Use \"interrupt\" to stop it first."
>
> I have mixed feelings with the above test names. I'd know what to look
> for in case of failure, but more explicit test names wouldn't hurt for a
> quick inspection of the logs.
>
> "move thread"
> "switch record on when thread is moving"
>
> Feel free to pick it up though. Not a hard requirement.
You are right, it helps when reading the test. The command by itself doesn't
convey why we are using doing that command. How about:
proc_with_prefix test_record_while_running { } {
gdb_test "continue &" "Continuing." "resume target"
gdb_test \
"record" \
"Can't enable record while the program is running. Use \"interrupt\" to stop it first." \
"switch record on while target is running"
}
PASS: gdb.reverse/record-while-running.exp: test_record_while_running: resume target
PASS: gdb.reverse/record-while-running.exp: test_record_while_running: switch record on while target is running
I added proc_with_prefix, I think it can help by giving some context to the messages.
Thanks for the feedback,
Simon