forked from Imagelibrary/binutils-gdb
Adjust gdb.base/bp-cond-failure.exp for Cygwin
Currently on Cygwin, I get: Running /home/alves/gdb/src/gdb/testsuite/gdb.base/bp-cond-failure.exp ... FAIL: gdb.base/bp-cond-failure.exp: access_type=char: cond_eval=auto: multi-loc: continue FAIL: gdb.base/bp-cond-failure.exp: access_type=char: cond_eval=auto: single-loc: continue FAIL: gdb.base/bp-cond-failure.exp: access_type=short: cond_eval=auto: multi-loc: continue FAIL: gdb.base/bp-cond-failure.exp: access_type=short: cond_eval=auto: single-loc: continue FAIL: gdb.base/bp-cond-failure.exp: access_type=int: cond_eval=auto: multi-loc: continue FAIL: gdb.base/bp-cond-failure.exp: access_type=int: cond_eval=auto: single-loc: continue FAIL: gdb.base/bp-cond-failure.exp: access_type=long long: cond_eval=auto: multi-loc: continue FAIL: gdb.base/bp-cond-failure.exp: access_type=long long: cond_eval=auto: single-loc: continue On GNU/Linux, we see: Breakpoint 2.1, foo () at .../src/gdb/testsuite/gdb.base/bp-cond-failure.c:21 21 return 0; /* Multi-location breakpoint here. */ (gdb) PASS: gdb.base/bp-cond-failure.exp: access_type=char: cond_eval=auto: multi-loc: continue While on Cygwin, we see: Thread 1 "bp-cond-failure" hit Breakpoint 2.1, foo () at .../src/gdb/testsuite/gdb.base/bp-cond-failure.c:21 21 return 0; /* Multi-location breakpoint here. */ (gdb) FAIL: gdb.base/bp-cond-failure.exp: access_type=char: cond_eval=auto: multi-loc: continue The difference is the "Thread 1" part in the beginning of the quoted output. It appears on Cygwin, but not on Linux. That's because on Cygwin, all inferiors are multi-threaded, because both Windows and the Cygwin runtime spawn a few helper threads. Fix this by adjusting the gdb.base/bp-cond-failure.exp testcase to work with either single- or multi-threaded inferiors. The testcase passes cleanly for me after this. Approved-by: Kevin Buettner <kevinb@redhat.com> Change-Id: I5ff11d06ac1748d044cef025f1e78b8f84ad3349
This commit is contained in:
@@ -75,7 +75,7 @@ proc run_test { cond_eval access_type bpexpr nloc } {
|
||||
"Error in testing condition for breakpoint ${bp_num}.2:" \
|
||||
"Cannot access memory at address 0x0" \
|
||||
"" \
|
||||
"Breakpoint ${bp_num}.2, foo \\(c=49 ...\\) at \[^\r\n\]+:\[0-9\]+" \
|
||||
"(Thread \[^\r\n\]+ hit )?Breakpoint ${bp_num}.2, foo \\(c=49 ...\\) at \[^\r\n\]+:\[0-9\]+" \
|
||||
"${::decimal}\\s+\[^\r\n\]+ breakpoint here\\. \[^\r\n\]+"]
|
||||
} else {
|
||||
gdb_test "continue" \
|
||||
@@ -84,7 +84,7 @@ proc run_test { cond_eval access_type bpexpr nloc } {
|
||||
"Error in testing condition for breakpoint ${bp_num}:" \
|
||||
"Cannot access memory at address 0x0" \
|
||||
"" \
|
||||
"Breakpoint ${bp_num}, bar \\(\\) at \[^\r\n\]+:\[0-9\]+" \
|
||||
"(Thread \[^\r\n\]+ hit )?Breakpoint ${bp_num}, bar \\(\\) at \[^\r\n\]+:\[0-9\]+" \
|
||||
"${::decimal}\\s+\[^\r\n\]+ breakpoint here\\. \[^\r\n\]+"]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user