2012-01-04 08:17:56 +00:00
|
|
|
# Copyright (C) 2010-2012 Free Software Foundation, Inc.
|
gdb/
* breakpoint.c (save_breakpoints): Use RETURN_MASK_ALL.
* cli-out.c: Include vec.h.
(cli_field_fmt, cli_spaces, cli_text, cli_message, cli_flush): New
variable stream, initialize it, use it.
(cli_redirect): New function comment. Replace the stream and
original_stream fields by the new streams field. Remove the
original_stream != NULL conditional, assert error on NULL instead.
(out_field_fmt, field_separator): New variable stream, initialize it, use it.
(cli_out_data_ctor): Assert non-NULL stream. Replace the stream and
original_stream fields by the new streams field.
(cli_out_set_stream): Replace the stream field by the new streams
field.
* cli-out.h: Include vec.h.
(ui_filep): New typedef, call DEF_VEC_P for it.
(struct cli_ui_out_data): Replace the stream and original_stream
fields by the new streams field.
* cli/cli-logging.c (set_logging_redirect): Call ui_out_redirect with
NULL first. Extend the comment.
(handle_redirections): Call ui_out_redirect with output.
* python/py-breakpoint.c (bppy_get_commands): Move ui_out_redirect
calls outside of the TRY_CATCH block.
gdb/testsuite/
* gdb.base/ui-redirect.exp: New file.
2010-09-03 15:42:04 +00:00
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
if { [prepare_for_testing ui-redirect.exp ui-redirect start.c] } {
|
|
|
|
return -1
|
|
|
|
}
|
|
|
|
|
|
|
|
gdb_breakpoint main
|
|
|
|
|
|
|
|
set test "commands"
|
|
|
|
gdb_test_multiple $test $test {
|
|
|
|
-re "End with a line saying just \"end\"\\.\r\n>$" {
|
|
|
|
pass $test
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
set test "print 1"
|
|
|
|
gdb_test_multiple $test $test {
|
|
|
|
-re "\r\n>$" {
|
|
|
|
pass $test
|
|
|
|
}
|
|
|
|
}
|
|
|
|
gdb_test_no_output "end"
|
|
|
|
|
|
|
|
gdb_test_no_output "set logging file /dev/null"
|
|
|
|
gdb_test "set logging on" "Copying output to /dev/null\\."
|
|
|
|
gdb_test "save breakpoints /dev/null" "Saved to file '/dev/null'\\."
|
|
|
|
gdb_test "set logging off" "Done logging to /dev/null\\."
|
|
|
|
gdb_test "help" "List of classes of commands:.*"
|