This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] testsuite: Record all gdb input to gdb.in
- From: Tom Tromey <tom at tromey dot com>
- To: Alan Hayward <Alan dot Hayward at arm dot com>
- Cc: "gdb-patches\@sourceware.org" <gdb-patches at sourceware dot org>, nd <nd at arm dot com>
- Date: Tue, 30 Apr 2019 09:06:27 -0600
- Subject: Re: [PATCH] testsuite: Record all gdb input to gdb.in
- References: <20190429160736.34276-1-alan.hayward@arm.com>
>>>>> "Alan" == Alan Hayward <Alan.Hayward@arm.com> writes:
Alan> Once a test has been run, the .in file can be used to re-run the test in the
Alan> following way:
Alan> gdb -x outputs/gdb.store/gdb.in outputs/gdb.store/store
Alan> Note, this functionality is ALWAYS on when running a test. I considered this
Alan> would be more useful than making it optional.
I think it probably makes sense to delete the existing TRANSCRIPT code
when doing this.
Alan> + # First time opening.
Alan> + set in_file_count 0
Alan> + set logfile [standard_output_file gdb.in]
Does anything ever reset in_file_count?
Or if you run a bunch of test cases, will the number just keep incrementing?
Alan> + switch -regexp -- $type {
Why -regexp?
Alan> + #Write to the log
Space after the "#".
Alan> + puts -nonewline $in_file "$message"
It may be good for this code to catch errors, not sure though.
Tom