aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog8
-rw-r--r--gdb/testsuite/lib/gdb.exp6
-rw-r--r--gdb/testsuite/lib/mi-support.exp6
3 files changed, 18 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 48139f2..29db747 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2020-10-26 Tom Tromey <tom@tromey.com>
+
+ * lib/mi-support.exp (default_mi_gdb_start): Call
+ gdb_stdin_log_init.
+ * lib/gdb.exp (standard_output_file_with_gdb_instance): Don't
+ subtract one from gdb_instances.
+ (gdb_stdin_log_write): Flush in_file.
+
2020-10-26 Tom de Vries <tdevries@suse.de>
* gdb.dwarf2/enqueued-cu-base-addr.exp: New file.
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 197542e..8b00ee0 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -5213,7 +5213,7 @@ proc standard_output_file {basename} {
proc standard_output_file_with_gdb_instance {basename} {
global gdb_instances
- set count [expr $gdb_instances - 1 ]
+ set count $gdb_instances
if {$count == 0} {
return [standard_output_file $basename]
@@ -7216,8 +7216,10 @@ proc gdb_stdin_log_write { message {type standard} } {
}
}
- #Write to the log
+ # Write to the log and make sure the output is there, even in case
+ # of crash.
puts -nonewline $in_file "$message"
+ flush $in_file
}
# Write the command line used to invocate gdb to the cmd file.
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index 3dea699..8e7b0ab 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -206,6 +206,12 @@ proc default_mi_gdb_start { args } {
global MIFLAGS
global FORCE_SEPARATE_MI_TTY
+ # Keep track of the number of times GDB has been launched.
+ global gdb_instances
+ incr gdb_instances
+
+ gdb_stdin_log_init
+
if {[info exists FORCE_SEPARATE_MI_TTY]} {
set separate_mi_pty $FORCE_SEPARATE_MI_TTY
} else {