binutils-gdb/gdb/testsuite/gdb.perf
Doug Evans 3714cea7d4 Pass plain-text prompt to with_gdb_prompt.
I had occasion to use with_gdb_prompt in a test for the patch for PR 17314
and was passing the plain text prompt as the value, "(top-gdb)",
instead of a regexp, "\(top-gdb\)" (expressed as "\\(top-gdb\\)" in TCL).

I then discovered that in order to restore the prompt gdb passes the
original value of $gdb_prompt to "set prompt", which works because
"set prompt \(gdb\) " is equivalent to "set prompt (gdb) ".
Perhaps I'm being overly cautious but this feels a bit subtle,
but at any rate as an API choice I'd much rather pass the plain text
form to with_gdb_prompt.

I also discovered that the initial value of gdb_prompt is set in
two places to two different values.
At the global level gdb.exp sets it to "\[(\]gdb\[)\]"
and default_gdb_init sets it to "\\(gdb\\)".
The former form is undesirable as an argument to "set prompt",
but it's not clear to me that just deleting this code won't break
anything.  Thus I just changed the value to be consistent and added
a comment.

gdb/testsuite/ChangeLog:

	* lib/gdb.exp (gdb_prompt): Add comment and change initial value to
	be consistent with what default_gdb_init uses.
	(with_gdb_prompt): Change form of PROMPT argument from a regexp to
	the plain text of the prompt.  Add some logging printfs.
	* gdb.perf/disassemble.exp: Update call to with_gdb_prompt.
2014-09-13 15:52:15 -07:00
..
lib/perftest Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
Makefile.in
backtrace.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
backtrace.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
backtrace.py Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
disassemble.exp Pass plain-text prompt to with_gdb_prompt. 2014-09-13 15:52:15 -07:00
disassemble.py Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
single-step.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
single-step.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
single-step.py Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
skip-prologue.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
skip-prologue.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
skip-prologue.py Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
solib.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
solib.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
solib.py Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00