binutils-gdb/gdb/testsuite/lib
Tom de Vries 30331a6ca0 [gdb/testsuite] Restore breakpoint command in ui-redirect.exp
In gdb.base/ui-redirect.exp, the "save breakpoint" command is used to write
the current breakpoints to a file, but the actual output is not verified.

Consequently, the test has regressed in that the "print 1" command associated
with a breakpoint on main is removed by a subsequent runto_main, which first
deletes all breakpoints:
...
(gdb) break main
Breakpoint 1 at 0x4004d7: file start.c, line 34.
(gdb) commands
Type commands for breakpoint(s) 1, one per line.
End with a line saying just "end".
> PASS: gdb.base/ui-redirect.exp: commands
print 1
> PASS: gdb.base/ui-redirect.exp: print 1
end
(gdb) PASS: gdb.base/ui-redirect.exp: end
delete breakpoints
Delete all breakpoints? (y or n) y
...
and consequently the "save breakpoint" output is missing the breakpoint
command for main:
...
 break main
-  commands
-    print 1
-  end
 break foo
 break bar
...

Fix this by replacing "gdb_breakpoint main" with runto_main, and verifying the
"save breakpoints" output.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2019-09-05  Tom de Vries  <tdevries@suse.de>

	* lib/gdb.exp (cmp_file_string): New proc.
	* gdb.base/ui-redirect.exp: Replace "gdb_breakpoint main" with
	runto_main.  Verify save breakpoints output.
2019-09-05 14:33:10 +02:00
..
ada.exp
append_gdb_boards_dir.exp
build-piece.exp
cache.exp
cell.exp
cl_util.c
cl_util.h
compile-support.exp
compiler.c
compiler.cc
completion-support.exp Add check for readline support to more GDB tab-completion tests. 2019-08-04 14:26:39 -07:00
cp-support.exp
d-support.exp
data-structures.exp
dtrace.exp
dwarf.exp
fortran.exp [gdb/testsuite] Fix gdb.fortran/info-types.exp regexp 2019-08-29 14:43:11 +02:00
future.exp
gdb-guile.exp
gdb-python.exp
gdb-utils.exp Update tests following changes to "help" and "apropos" 2019-06-03 21:59:35 +02:00
gdb.exp [gdb/testsuite] Restore breakpoint command in ui-redirect.exp 2019-09-05 14:33:10 +02:00
gdbserver-support.exp testsuite: Mark the kill in gdbserver_run as optional 2019-05-21 10:42:24 +01:00
gen-perf-test.exp
go.exp
memory.exp
mi-support.exp [gdb/testsuite] Test skip_libstdcxx_probe_tests in mi-catch-cpp-exceptions.exp 2019-07-25 18:39:31 +02:00
objc.exp
opencl_hostapp.c
opencl_kernel.cl
opencl.exp
pascal.exp [gdb/testsuite] Clean up stale exec in gdb_compile_pascal 2019-08-20 17:18:09 +02:00
pdtrace.in
perftest.exp
prelink-support.exp
prompt.exp
range-stepping-support.exp
read1.c [gdb/testsuite] Work around tcl bug in libsegfault.exp with check-read1 2019-07-30 16:15:46 +02:00
rust-support.exp
selftest-support.exp
set_unbuffered_mode.c
trace-support.exp
tuiterm.exp Remove the TUI execution info window 2019-08-16 14:17:36 -06:00
unbuffer_output.c
valgrind.exp