Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Sterling Augustine <saugustine@google.com>
To: gdb-patches <gdb-patches@sourceware.org>
Subject: [Patch] Mechanism for board files to set default remotetimeout
Date: Thu, 30 May 2013 23:42:00 -0000	[thread overview]
Message-ID: <CAEG7qUxhokN487WsVXgQsRj5MGv-mPw8D2WB9oT7dYRBmA3UMw@mail.gmail.com> (raw)

[-- 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
 

             reply	other threads:[~2013-05-30 23:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-30 23:42 Sterling Augustine [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEG7qUxhokN487WsVXgQsRj5MGv-mPw8D2WB9oT7dYRBmA3UMw@mail.gmail.com \
    --to=saugustine@google.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox