diff options
author | Michael Snyder <msnyder@vmware.com> | 2011-02-25 19:19:26 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2011-02-25 19:19:26 +0000 |
commit | c82c0b55e7f5182e3822f3878b9bc67a241d4f21 (patch) | |
tree | 6c0a9c8dd7f02ac84d7cf46af434a0ab79a2b6af /gdb/testsuite/gdb.multi | |
parent | 093a6ec67f9a17e6ef0e1b8ae828cbe5936f97fd (diff) | |
download | gdb-c82c0b55e7f5182e3822f3878b9bc67a241d4f21.zip gdb-c82c0b55e7f5182e3822f3878b9bc67a241d4f21.tar.gz gdb-c82c0b55e7f5182e3822f3878b9bc67a241d4f21.tar.bz2 |
2011-02-25 Michael Snyder <msnyder@vmware.com>
* inferior.c (print_inferior): Accept a string instead of an int
for requested_inferiors, and use get_number_or_range to parse it.
(info_inferiors_command): Pass args string to print_inferior.
(initialize_inferiors): Change help string for info inferiors.
* inferior.h (print_inferior): Export prototype change.
2011-02-25 Michael Snyder <msnyder@vmware.com>
* gdb.multi/base.exp: Add tests for info inferiors with args.
Diffstat (limited to 'gdb/testsuite/gdb.multi')
-rw-r--r-- | gdb/testsuite/gdb.multi/base.exp | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.multi/base.exp b/gdb/testsuite/gdb.multi/base.exp index 55f90fd..c45b846 100644 --- a/gdb/testsuite/gdb.multi/base.exp +++ b/gdb/testsuite/gdb.multi/base.exp @@ -61,6 +61,60 @@ gdb_test "add-inferior -exec ${binfile3}" \ gdb_test "info inferiors" \ "Executable.*${exec3}.*${exec2}.*${exec1}.*" +# Test info inferiors with args + +set see1 0 +set see2 0 +set see3 0 + +gdb_test_multiple "info inferior 2 3" "info inferior 2 3" { + -re ". 3 \[^\r\n\]*${exec3}" { + set see3 1 + exp_continue + } + -re ". 2 \[^\r\n\]*${exec2}" { + set see2 1 + exp_continue + } + -re ". 1 \[^\r\n\]*${exec1}" { + set see1 1 + exp_continue + } + -re "$gdb_prompt $" { + if { !$see1 && $see2 && $see3 } then { + pass "info inferior 2 3" + } else { + fail "info inferior 2 3" + } + } +} + +set see1 0 +set see2 0 +set see3 0 + +gdb_test_multiple "info inferior 1-2" "info inferior 1-2" { + -re ". 3 \[^\r\n\]*${exec3}" { + set see3 1 + exp_continue + } + -re ". 2 \[^\r\n\]*${exec2}" { + set see2 1 + exp_continue + } + -re ". 1 \[^\r\n\]*${exec1}" { + set see1 1 + exp_continue + } + -re "$gdb_prompt $" { + if { $see1 && $see2 && !$see3 } then { + pass "info inferior 1-2" + } else { + fail "info inferior 1-2" + } + } +} + # Test that we have multiple symbol tables. gdb_test "inferior 1" ".*" "switch to inferior 1" |