This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] maint.exp miscexprs.exp nodebug.exp send_gdb / gdb_test
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Michael Snyder <msnyder at vmware dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 25 May 2010 10:23:32 -0700
- Subject: Re: [RFA] maint.exp miscexprs.exp nodebug.exp send_gdb / gdb_test
- References: <4BF5CF46.4000105@vmware.com>
> 2010-05-20 Michael Snyder <msnyder@vmware.com>
>
> * gdb.base/maint.exp: Replace send_gdb with gdb_test.
> * gdb.base/miscexprs.exp: Replace send_gdb with gdb_test.
> * gdb.base/nodebug.exp: Replace send_gdb with gdb_test.
I only spotted one issue... The rest looked ok to me.
> +gdb_test "maint space 0" "maint space 0"
Shouldn't this one be gdb_test_no_output?
> + -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.
--
Joel