+2019-05-17 Alan Hayward <alan.hayward@arm.com>
+
+ * disasm.c (set_disassembler_options): Send errors to stderr.
+
2019-05-17 Alan Hayward <alan.hayward@arm.com>
* cli/cli-interp.c (struct saved_output_files): Add saved entry.
valid_options_and_args = gdbarch_valid_disassembler_options (gdbarch);
if (valid_options_and_args == NULL)
{
- fprintf_filtered (gdb_stdlog, _("\
+ fprintf_filtered (gdb_stderr, _("\
'set disassembler-options ...' is not supported on this architecture.\n"));
return;
}
break;
if (valid_options->name[i] == NULL)
{
- fprintf_filtered (gdb_stdlog,
+ fprintf_filtered (gdb_stderr,
_("Invalid disassembler option value: '%s'.\n"),
opt);
return;
+2019-05-17 Alan Hayward <alan.hayward@arm.com>
+
+ * gdb.base/breakpoint-in-ro-region.exp: Disable when debugging.
+ * gdb.base/debug-expr.exp: Likewise.
+ * gdb.base/foll-fork.exp: Likewise.
+ * gdb.base/foll-vfork.exp: Likewise.
+ * gdb.base/fork-print-inferior-events.exp: Likewise.
+ * gdb.base/gdb-sigterm.exp: Likewise.
+ * gdb.base/gdbinit-history.exp: Likewise.
+ * gdb.base/osabi.exp: Likewise.
+ * gdb.base/sss-bp-on-user-bp-2.exp: Likewise.
+ * gdb.base/ui-redirect.exp: Likewise.
+ * gdb.gdb/unittest.exp: Likewise.
+ * gdb.mi/mi-break.exp: Disable separate-mi-tty when debugging.
+ * gdb.mi/mi-watch.exp: Likewise.
+ * gdb.mi/new-ui-mi-sync.exp: Likewise.
+ * gdb.mi/user-selected-context-sync.exp: Likewise.
+ * gdb.python/python.exp: Disable debug test when debugging.
+ * gdb.threads/check-libthread-db.exp: Disable when debugging.
+ * gdb.threads/signal-while-stepping-over-bp-other-thread.exp:
+ Likewise.
+ * gdb.threads/stepi-random-signal.exp: Likewise.
+
2019-05-17 Alan Hayward <alan.hayward@arm.com>
* Makefile.in: Pass through GDB_DEBUG.
* README (Testsuite Parameters): Add GDB_DEBUG.
- (gdb,debug): Add board setting.
- * lib/gdb.exp (default_gdb_start): Start debugging.
- (gdb_debug_enabled): New procedure.
- (gdb_debug_init): Likewise.
+ (gdb,debug): Add board setting.
+ * lib/gdb.exp (default_gdb_start): Start debugging.
+ (gdb_debug_enabled): New procedure.
+ (gdb_debug_init): Likewise.
2019-05-17 Alan Hayward <alan.hayward@arm.com>
-
+
* Makefile.in: Pass through GDB_DEBUG.
* README (Testsuite Parameters): Add GDB_DEBUG.
- (gdb,debug): Add board setting.
- * lib/gdb.exp (default_gdb_start): Start debugging.
- (gdb_debug_enabled): New procedure.
- (gdb_debug_init): Likewise.
+ (gdb,debug): Add board setting.
+ * lib/gdb.exp (default_gdb_start): Start debugging.
+ (gdb_debug_enabled): New procedure.
+ (gdb_debug_init): Likewise.
2019-05-17 Alan Hayward <alan.hayward@arm.com>
# This file is part of the gdb testsuite
+# Test relies on checking gdb debug output. Do not run if gdb debug is
+# enabled as any debug will be redirected to the log.
+if [gdb_debug_enabled] {
+ untested "debug is enabled"
+ return 0
+}
+
standard_testfile
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
# Test "set debug expr 1" on c expressions.
+# Test relies on checking gdb debug output. Do not run if gdb debug is
+# enabled as any debug will be redirected to the log.
+if [gdb_debug_enabled] {
+ untested "debug is enabled"
+ return 0
+}
+
standard_testfile .c
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug}]} {
continue
}
+# Test relies on checking follow-fork output. Do not run if gdb debug is
+# enabled as it will be redirected to the log.
+if [gdb_debug_enabled] {
+ untested "debug is enabled"
+ return 0
+}
+
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
continue
}
+# Test relies on checking follow-fork output. Do not run if gdb debug is
+# enabled as it will be redirected to the log.
+if [gdb_debug_enabled] {
+ untested "debug is enabled"
+ return 0
+}
+
standard_testfile
set compile_options debug
return
}
+# Test relies on checking follow-fork output. Do not run if gdb debug is
+# enabled as it will be redirected to the log.
+if [gdb_debug_enabled] {
+ untested "debug is enabled"
+ return 0
+}
+
standard_testfile
if { [prepare_for_testing "failed to prepare" $testfile $srcfile debug] } {
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# Test relies on checking gdb debug output. Do not run if gdb debug is
+# enabled as any debug will be redirected to the log.
+if [gdb_debug_enabled] {
+ untested "debug is enabled"
+ return 0
+}
+
standard_testfile
# The test program exits after a while, in case GDB crashes. Make it
# We cannot expect remote hosts to see environment variables set on the
# local machine.
+# Do not run if gdb debug is enabled - it interferes with the command history.
+if [gdb_debug_enabled] {
+ untested "debug is enabled"
+ return 0
+}
+
if { [is_remote host] } {
unsupported "can't set environment variables on remote host"
return -1
# This file is part of the gdb testsuite.
+# Test relies on checking gdb debug output. Do not run if gdb debug is
+# enabled as any debug will be redirected to the log.
+if [gdb_debug_enabled] {
+ untested "debug is enabled"
+ return 0
+}
+
# Test that choosing "set osabi none" really requests a gdbarch with no osabi.
proc test_set_osabi_none { } {
# 4 - The single-step finishes, and GDB removes the single-step
# breakpoint.
+# Test relies on checking gdb debug output. Do not run if gdb debug is
+# enabled as any debug will be redirected to the log.
+if [gdb_debug_enabled] {
+ untested "debug is enabled"
+ return 0
+}
+
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# Do not run if gdb debug is enabled as it will interfere with log redirect.
+if [gdb_debug_enabled] {
+ untested "debug is enabled"
+ return 0
+}
+
if { [prepare_for_testing "failed to prepare" ui-redirect start.c] } {
return -1
}
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# Do not run if gdb debug is enabled as maintenance output will be
+# redirected to the log files.
+if [gdb_debug_enabled] {
+ untested "debug is enabled"
+ return 0
+}
+
set do_xml_test [expr ![gdb_skip_xml_test]]
gdb_start
test_explicit_breakpoints
}
-foreach_with_prefix mi-mode {"main" "separate"} {
+if [gdb_debug_enabled] {
+ # gdb debug doesn't work for separate-mi-tty.
+ set modes {"main"}
+} else {
+ set modes {"main" "separate"}
+}
+
+foreach_with_prefix mi-mode $modes {
test_break ${mi-mode}
}
test_watchpoint_triggering
}
+if [gdb_debug_enabled] {
+ # gdb debug doesn't work for separate-mi-tty.
+ set modes {"main"}
+} else {
+ set modes {"main" "separate"}
+}
+
# Run the tests twice, once using software watchpoints, and another
# with hardware watchpoints.
-foreach_with_prefix mi-mode {"main" "separate"} {
+foreach_with_prefix mi-mode $modes {
foreach_with_prefix wp-type {"sw" "hw"} {
test_watchpoint_all ${mi-mode} ${wp-type}
}
# commands, MI should not process further commands until the inferior
# stops again. See PR gdb/20418.
+# Do not run if gdb debug is enabled as it doesn't work for separate-mi-tty.
+if [gdb_debug_enabled] {
+ untested "debug is enabled"
+ return 0
+}
+
load_lib mi-support.exp
standard_testfile
# - Thread 3 of each inferior is either stopped at /* thread loop line */, if we
# are using all-stop, or running, if we are using non-stop.
+# Do not run if gdb debug is enabled as it doesn't work for separate-mi-tty.
+if [gdb_debug_enabled] {
+ untested "debug is enabled"
+ return 0
+}
+
load_lib mi-support.exp
standard_testfile
gdb_test "python gdb.write(\"Foo\\n\")" "Foo" "test default write"
gdb_test "python gdb.write(\"Error stream\\n\", stream=gdb.STDERR)" "Error stream" "test stderr write"
gdb_test "python gdb.write(\"Normal stream\\n\", stream=gdb.STDOUT)" "Normal stream" "test stdout write"
-gdb_test "python gdb.write(\"Log stream\\n\", stream=gdb.STDLOG)" "Log stream" "test stdlog write"
+
+if ![gdb_debug_enabled] {
+ gdb_test "python gdb.write(\"Log stream\\n\", stream=gdb.STDLOG)" "Log stream" "test stdlog write"
+}
# Turn on full stack printing for subsequent tests.
gdb_py_test_silent_cmd "set python print-stack full" \
continue
}
+# Test relies on checking gdb debug output. Do not run if gdb debug is
+# enabled as any debug will be redirected to the log.
+if [gdb_debug_enabled] {
+ untested "debug is enabled"
+ return 0
+}
+
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
# stop, when the thread that hit that breakpoint is not the stepped
# thread.
+# Test relies on checking gdb debug output. Do not run if gdb debug is
+# enabled as any debug will be redirected to the log.
+if [gdb_debug_enabled] {
+ continue
+}
+
standard_testfile
set executable ${testfile}
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# Test relies on checking gdb debug output. Do not run if gdb debug is
+# enabled as any debug will be redirected to the log.
+if [gdb_debug_enabled] {
+ untested "debug is enabled"
+ return 0
+}
+
standard_testfile
set executable ${testfile}