This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] maint.exp miscexprs.exp nodebug.exp send_gdb / gdb_test


Joel Brobecker wrote:
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?

Sounds good.



+    -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.

Heh. Not me...



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]