diff options
author | Jim Blandy <jimb@codesourcery.com> | 2002-02-21 20:58:25 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2002-02-21 20:58:25 +0000 |
commit | 27924826b5d3bd43e754c2eb9f03df66511336eb (patch) | |
tree | 7cee74382847659cddc2f66f638a79170e41c769 | |
parent | a640f7fc6bbb0f1f5b4ac05631528f28ce2754cd (diff) | |
download | gdb-27924826b5d3bd43e754c2eb9f03df66511336eb.zip gdb-27924826b5d3bd43e754c2eb9f03df66511336eb.tar.gz gdb-27924826b5d3bd43e754c2eb9f03df66511336eb.tar.bz2 |
* gdb.asm/asm-source.exp: Parse the output from `info sources' one
filename at a time, and watch for the ones we want to see.
-rw-r--r-- | gdb/testsuite/ChangeLog | 3 | ||||
-rw-r--r-- | gdb/testsuite/gdb.asm/asm-source.exp | 35 |
2 files changed, 34 insertions, 4 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 645e78b..f0e4d73 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2002-02-21 Jim Blandy <jimb@redhat.com> + * gdb.asm/asm-source.exp: Parse the output from `info sources' one + filename at a time, and watch for the ones we want to see. + * gdb.base/ptype.exp, gdb.base/ptype.c: Add tests for printing types of pointers to prototyped functions. diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp index fbcfa7c..471b31a 100644 --- a/gdb/testsuite/gdb.asm/asm-source.exp +++ b/gdb/testsuite/gdb.asm/asm-source.exp @@ -202,10 +202,37 @@ gdb_test "info source" \ "Current source file is .*asmsrc2.s.*Source language is asm.*" \ "info source asmsrc2.s" -# Try 'info sources' -gdb_test "info sources" \ - "Source files .*asmsrc\[12\].s.*asmsrc\[12\].s.*" \ - "info sources" +# Try 'info sources'. This can produce a lot of output on systems +# with dynamic linking, where the system's shared libc was compiled +# with debugging info; for example, on Linux, this produces 47kb of +# output. So we consume it as we go. +send_gdb "info sources\n" +set seen_asmsrc_1 0 +set seen_asmsrc_2 0 +gdb_expect { + -re "^\[^,\]*asmsrc1.s(, |\[\r\n\]+)" { + set seen_asmsrc_1 1 + exp_continue + } + -re "^\[^,\]*asmsrc2.s(, |\[\r\n\]+)" { + set seen_asmsrc_2 1 + exp_continue + } + -re ", " { + exp_continue + } + -re "$gdb_prompt $" { + if {$seen_asmsrc_1 && $seen_asmsrc_2} { + pass "info sources" + } else { + fail "info sources" + } + } + timeout { + fail "info sources (timeout)" + } +} + # Try 'info line' gdb_test "info line" \ |