Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [Patch] Mechanism for board files to set default remotetimeout
@ 2013-05-30 23:42 Sterling Augustine
  2013-05-31 10:13 ` Pedro Alves
  0 siblings, 1 reply; 7+ messages in thread
From: Sterling Augustine @ 2013-05-30 23:42 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 495 bytes --]

The enclosed simple patch adds and demonstrates a new mechanism for a
board file to declare a default remotetimeout. It follows a similar
mechanism as set height 0.

This is useful if the board has high latency for internal gdb
commands, as remote-stdio-gdbserver.exp does.

OK for trunk?

Sterling

2013-05-30  Sterling Augustine  <saugustine@google.com>

	* lib/gdb.exp (default_gdb_start): Use new global gdb_remotetimeout.
	* boards/remote-stdio-gdbserver.exp: Set global gdb_remotetimeout.

[-- Attachment #2: remotetimeout.patch --]
[-- Type: application/octet-stream, Size: 1306 bytes --]

Index: lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.231
diff -u -r1.231 gdb.exp
--- lib/gdb.exp	6 May 2013 22:11:15 -0000	1.231
+++ lib/gdb.exp	30 May 2013 23:17:23 -0000
@@ -1403,6 +1403,7 @@
     global gdb_prompt
     global timeout
     global gdb_spawn_id;
+    global gdb_remotetimeout
 
     gdb_stop_suppressing_tests;
 
@@ -1447,6 +1448,12 @@
 	}
     }
     set gdb_spawn_id -1;
+
+    # Reset remotetimeout if needed.
+    if [info exists gdb_remotetimeout] {
+	set_remotetimeout $gdb_remotetimeout
+    }
+
     # force the height to "unlimited", so no pagers get used
 
     send_gdb "set height 0\n"
Index: boards/remote-stdio-gdbserver.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/boards/remote-stdio-gdbserver.exp,v
retrieving revision 1.1
diff -u -r1.1 remote-stdio-gdbserver.exp
--- boards/remote-stdio-gdbserver.exp	21 May 2013 17:58:46 -0000	1.1
+++ boards/remote-stdio-gdbserver.exp	30 May 2013 23:17:23 -0000
@@ -26,6 +26,9 @@
 
 load_board_description "native-stdio-gdbserver"
 
+global gdb_remotetimeout
+set gdb_remotetimeout 60
+
 set_board_info rsh_prog /usr/bin/ssh
 set_board_info rcp_prog /usr/bin/scp
 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-06-03 11:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-30 23:42 [Patch] Mechanism for board files to set default remotetimeout Sterling Augustine
2013-05-31 10:13 ` Pedro Alves
2013-05-31 20:57   ` Sterling Augustine
2013-05-31 22:49     ` Sterling Augustine
2013-06-03 11:31       ` Pedro Alves
2013-06-03 10:52     ` Pedro Alves
2013-06-03 11:09       ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox