From: Patrick Palka <patrick@parcs.ath.cx>
To: gdb-patches@sourceware.org
Cc: Patrick Palka <patrick@parcs.ath.cx>
Subject: [PATCH] Clean up batch-preserve-term-settings.exp
Date: Tue, 28 Jul 2015 21:08:00 -0000 [thread overview]
Message-ID: <1438117682-22449-1-git-send-email-patrick@parcs.ath.cx> (raw)
See ChangeLog for details. No functional change intended.
Tested on x86_64 Debian Stretch by verifying that the gdb.log output
remains unchanged for native, gdbserver and extended-gdbserver.
gdb/testsuite/ChangeLog:
* gdb.base/batch-preserve-term-settings.exp: Remove top-level
manipulation of saved_gdbflags.
(test_terminal_settings_preserved): Remove global declaration of
the unused variable pagination_prompt. Remove manipulation of
saved_gdbflags. Use a local variable EXTRA_GDBFLAGS instead of
GDBFLAGS.
---
.../gdb.base/batch-preserve-term-settings.exp | 19 ++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/gdb/testsuite/gdb.base/batch-preserve-term-settings.exp b/gdb/testsuite/gdb.base/batch-preserve-term-settings.exp
index 834e7a9..97ffaa4 100644
--- a/gdb/testsuite/gdb.base/batch-preserve-term-settings.exp
+++ b/gdb/testsuite/gdb.base/batch-preserve-term-settings.exp
@@ -27,9 +27,6 @@ if [is_remote host] {
set file_arg [remote_download host $file_arg]
}
-global GDBFLAGS
-set saved_gdbflags $GDBFLAGS
-
# The shell's prompt.
set shell_prompt "$ "
set shell_prompt_re [string_to_regexp $shell_prompt]
@@ -119,8 +116,7 @@ proc run_stty {message result} {
proc test_terminal_settings_preserved {} {
global file_arg
global GDB INTERNAL_GDBFLAGS GDBFLAGS
- global gdb_prompt pagination_prompt
- global saved_gdbflags
+ global gdb_prompt
global shell_prompt_re
if ![spawn_shell] {
@@ -130,12 +126,11 @@ proc test_terminal_settings_preserved {} {
set stty_supported [run_stty "stty before" stty_before]
set test "gdb -batch -ex run"
- set GDBFLAGS $saved_gdbflags
- append GDBFLAGS " -batch"
- append GDBFLAGS " -ex \"set height unlimited\""
- append GDBFLAGS " -ex \"start\""
- append GDBFLAGS " --args \"$file_arg\""
- send_gdb "$GDB $INTERNAL_GDBFLAGS $GDBFLAGS [host_info gdb_opts]\n"
+ append EXTRA_GDBFLAGS "-batch"
+ append EXTRA_GDBFLAGS " -ex \"set height unlimited\""
+ append EXTRA_GDBFLAGS " -ex \"start\""
+ append EXTRA_GDBFLAGS " --args \"$file_arg\""
+ send_gdb "$GDB $INTERNAL_GDBFLAGS $GDBFLAGS $EXTRA_GDBFLAGS [host_info gdb_opts]\n"
gdb_expect {
-re "Don't know how to run.*$shell_prompt_re$" {
unsupported $test
@@ -182,5 +177,3 @@ proc test_terminal_settings_preserved {} {
}
test_terminal_settings_preserved
-
-set GDBFLAGS $saved_gdbflags
--
2.5.0.rc2.22.g69b1679.dirty
next reply other threads:[~2015-07-28 21:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-28 21:08 Patrick Palka [this message]
2015-07-28 23:23 ` 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=1438117682-22449-1-git-send-email-patrick@parcs.ath.cx \
--to=patrick@parcs.ath.cx \
--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