* [PATCH] gdb/testsuite: mark the start of each gdb.in.* log file
@ 2025-07-16 18:12 Andrew Burgess
2025-07-16 18:19 ` Simon Marchi
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Burgess @ 2025-07-16 18:12 UTC (permalink / raw)
To: gdb-patches; +Cc: Andrew Burgess
Emit a line in the gdb.log file each time a new gdb.in.NUM command log
is started. The gdb.log line includes the full filename for the new
gdb.in.NUM file.
This change will make it trivial to go from a FAIL in the gdb.log file
to the gdb.in.NUM file that (should) reproduce the failure. When I
encounter a failing test one of my first steps is usually to identify
the gdb.in.NUM file and try re-running it to see if that reproduces
the failure. Some test create many very similar gdb.in.NUM files, so
finding the exact one can sometimes be difficult. With this patch
that task is now trivial.
There should be no change in what is tested after this commit.
---
gdb/testsuite/lib/gdb.exp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 777d64d14d1..78356bf51f0 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -9990,6 +9990,10 @@ proc gdb_stdin_log_init { } {
set logfile [standard_output_file_with_gdb_instance gdb.in]
set in_file [open $logfile w]
+
+ verbose -log ""
+ verbose -log "Starting logfile: $logfile"
+ verbose -log ""
}
# Write to the file for logging gdb input.
base-commit: 1edefea39ff27ed2d4aed4e45ed416f3fbaf6098
--
2.47.1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] gdb/testsuite: mark the start of each gdb.in.* log file
2025-07-16 18:12 [PATCH] gdb/testsuite: mark the start of each gdb.in.* log file Andrew Burgess
@ 2025-07-16 18:19 ` Simon Marchi
2025-07-18 10:26 ` Andrew Burgess
0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2025-07-16 18:19 UTC (permalink / raw)
To: Andrew Burgess, gdb-patches
On 2025-07-16 14:12, Andrew Burgess wrote:
> Emit a line in the gdb.log file each time a new gdb.in.NUM command log
> is started. The gdb.log line includes the full filename for the new
> gdb.in.NUM file.
>
> This change will make it trivial to go from a FAIL in the gdb.log file
> to the gdb.in.NUM file that (should) reproduce the failure. When I
> encounter a failing test one of my first steps is usually to identify
> the gdb.in.NUM file and try re-running it to see if that reproduces
> the failure. Some test create many very similar gdb.in.NUM files, so
> finding the exact one can sometimes be difficult. With this patch
> that task is now trivial.
>
> There should be no change in what is tested after this commit.
> ---
> gdb/testsuite/lib/gdb.exp | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
> index 777d64d14d1..78356bf51f0 100644
> --- a/gdb/testsuite/lib/gdb.exp
> +++ b/gdb/testsuite/lib/gdb.exp
> @@ -9990,6 +9990,10 @@ proc gdb_stdin_log_init { } {
>
> set logfile [standard_output_file_with_gdb_instance gdb.in]
> set in_file [open $logfile w]
> +
> + verbose -log ""
> + verbose -log "Starting logfile: $logfile"
> + verbose -log ""
> }
>
> # Write to the file for logging gdb input.
>
> base-commit: 1edefea39ff27ed2d4aed4e45ed416f3fbaf6098
Sounds like a good idea to me.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Simon
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] gdb/testsuite: mark the start of each gdb.in.* log file
2025-07-16 18:19 ` Simon Marchi
@ 2025-07-18 10:26 ` Andrew Burgess
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Burgess @ 2025-07-18 10:26 UTC (permalink / raw)
To: Simon Marchi, gdb-patches
Simon Marchi <simark@simark.ca> writes:
> On 2025-07-16 14:12, Andrew Burgess wrote:
>> Emit a line in the gdb.log file each time a new gdb.in.NUM command log
>> is started. The gdb.log line includes the full filename for the new
>> gdb.in.NUM file.
>>
>> This change will make it trivial to go from a FAIL in the gdb.log file
>> to the gdb.in.NUM file that (should) reproduce the failure. When I
>> encounter a failing test one of my first steps is usually to identify
>> the gdb.in.NUM file and try re-running it to see if that reproduces
>> the failure. Some test create many very similar gdb.in.NUM files, so
>> finding the exact one can sometimes be difficult. With this patch
>> that task is now trivial.
>>
>> There should be no change in what is tested after this commit.
>> ---
>> gdb/testsuite/lib/gdb.exp | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
>> index 777d64d14d1..78356bf51f0 100644
>> --- a/gdb/testsuite/lib/gdb.exp
>> +++ b/gdb/testsuite/lib/gdb.exp
>> @@ -9990,6 +9990,10 @@ proc gdb_stdin_log_init { } {
>>
>> set logfile [standard_output_file_with_gdb_instance gdb.in]
>> set in_file [open $logfile w]
>> +
>> + verbose -log ""
>> + verbose -log "Starting logfile: $logfile"
>> + verbose -log ""
>> }
>>
>> # Write to the file for logging gdb input.
>>
>> base-commit: 1edefea39ff27ed2d4aed4e45ed416f3fbaf6098
>
> Sounds like a good idea to me.
>
> Approved-By: Simon Marchi <simon.marchi@efficios.com>
Pushed.
Thanks,
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-18 10:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-16 18:12 [PATCH] gdb/testsuite: mark the start of each gdb.in.* log file Andrew Burgess
2025-07-16 18:19 ` Simon Marchi
2025-07-18 10:26 ` Andrew Burgess
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox