[10/14] gdb/testsuite: Fix gdb.base/chng-syms.exp for remote target
Commit Message
From: Anton Kolesov <Anton.Kolesov@synopsys.com>
The pattern with which proc "gdb_load" in config/monitor.exp catches
errors during application load is not always appropriate - it assumes
that any message with the word "failed" in it means a load failure,
which is not correct. For example, testcase gdb.base/chng-syms.exp
causes a message: "warning: failed to reevaluate condition for
breakpoint 1" which is an expected result and doesn't mean that load
itself failed.
gdb/testsuite/ChangeLog:
2016-07-19 Anton Kolesov <Anton.Kolesov@synopsys.com>
* config/monitor.exp (gdb_load): Handle a false positive
failure case.
Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
---
gdb/testsuite/config/monitor.exp | 8 ++++++++
1 file changed, 8 insertions(+)
@@ -230,6 +230,14 @@ proc gdb_load { arg } {
set load_ok 0
send_gdb $command
gdb_expect $loadtimeout {
+ -re "warning: failed to reevaluate condition" {
+ # Catching just any "failed" word is not correct here. For
+ # example, testcase gdb.base/chng-syms.exp causes a message:
+ # "warning: failed to reevaluate condition for breakpoint 1"
+ # which is an expected result and doesn't mean that load
+ # itself failed.
+ exp_continue
+ }
-re "\[Ff\]ailed.*$gdb_prompt $" {
verbose "load failed"
}