+ -re "^maint print psymbols psymbols_output \[^\n\]*\r\n$gdb_prompt $" {
+ send_gdb "shell ls psymbols_output\n"
+ gdb_expect {
+ -re "psymbols_output\r\n$gdb_prompt $" {
+ # We want this grep to be as specific as possible,
+ # so it's less likely to match symbol file names in
+ # psymbols_output. Yes, this actually happened;
+ # poor expect got tons of output, and timed out
+ # trying to match it. --- Jim Blandy <jimb@cygnus.com>
+ send_gdb "shell grep 'main.*function' psymbols_output\n"
+ gdb_expect {
+ -re ".main., function, $hex.*$gdb_prompt $" {
+ pass "maint print psymbols 1"
+ }
+ -re ".*main. .., function, $hex.*$gdb_prompt $" {
+ pass "maint print psymbols 2"
+ }
+ -re ".*$gdb_prompt $" { fail "maint print psymbols" }
+ timeout { fail "(timeout) maint print psymbols" }
+ }
+ gdb_test "shell rm -f psymbols_output" ""
+ }
+ -re ".*$gdb_prompt $" { fail "maint print psymbols" }
+ timeout { fail "(timeout) maint print psymbols" }
+ }
+ }
+ -re ".*$gdb_prompt $" { fail "maint print psymbols" }
+ timeout { fail "(timeout) maint print psymbols" }
Ugh! I understand that this is not the objective of this patch, but
I think that this could be greatly simplified by rewriting this using
pure tcl, and without using GDB as the gateway to a shell interpreter.