aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.mi
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-04-27 18:45:47 +0100
committerAndrew Burgess <aburgess@redhat.com>2022-05-03 10:30:33 +0100
commit43cef57a742bae20477bb2fbb306ab4c4167318c (patch)
tree8671bda7246427571bc5778315cc9c0c1ec21e30 /gdb/testsuite/gdb.mi
parent11039eff7166cf40d502c88e8b161dd7602120aa (diff)
downloadbinutils-43cef57a742bae20477bb2fbb306ab4c4167318c.zip
binutils-43cef57a742bae20477bb2fbb306ab4c4167318c.tar.gz
binutils-43cef57a742bae20477bb2fbb306ab4c4167318c.tar.bz2
gdb/testsuite: change mi_gdb_start to take a list of flags
After this previous commit I was thinking about the API of mi_gdb_start. I felt that the idea of passing flags as separate arguments and using 'args' to gather these into a list, though clever, was not an intuitive API. In this commit I modify mi_gdb_start so that it expects a single argument, which should be a list of flags. Thus, where we previously would have said: mi_gdb_start separate-mi-tty separate-inferior-tty We would now say: mi_gdb_start { separate-mi-tty separate-inferior-tty } However, it turns out we never actually call mi_gdb_start passing two arguments in this way at all. We do in some places do this: mi_gdb_start separate-inferior-tty But that's fine, a single string like this works equally well as a single item list, so this will not need updating. There is also one place where we do this: eval mi_gdb_start $start_ops where $start_ops is a list that might contains 0, 1, or 2 items. The eval here is used to expand the $start_ops list so mi_gdb_start sees the list contents as separate arguments. In this case we just need to drop the use of eval. I think that the new API is more intuitive, but others might disagree, in which case I can drop this change. There should be no change in what is tested after this commit.
Diffstat (limited to 'gdb/testsuite/gdb.mi')
-rw-r--r--gdb/testsuite/gdb.mi/mi-exec-run.exp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.mi/mi-exec-run.exp b/gdb/testsuite/gdb.mi/mi-exec-run.exp
index ffbe6bc..f8e6550 100644
--- a/gdb/testsuite/gdb.mi/mi-exec-run.exp
+++ b/gdb/testsuite/gdb.mi/mi-exec-run.exp
@@ -60,7 +60,7 @@ proc test {inftty_mode mi_mode force_fail} {
lappend start_ops "separate-mi-tty"
}
- if [eval mi_gdb_start $start_ops] {
+ if [mi_gdb_start $start_ops] {
return
}