+2012-11-14 Yao Qi <yao@codesourcery.com>
+
+ * gdb.threads/manythreads.c [DEBUG]: Include "stdio.h".
+ (thread_function) [DEBUG]: Call 'printf'.
+ * gdb.threads/manythreads.exp: Pass '-DDEBUG' to compilation
+ command line if 'DEBUG=1' is passed to test.
+ Remove a pattern to match inferior's output.
+
2012-11-13 Giuseppe Montalto <giuseppe.montalto@st.com>
* gdb.mi/mi-fill-memory.exp: New test.
standard_testfile
-if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
+set opts { debug }
+if [info exists DEBUG] {
+ # make check RUNTESTFLAGS='gdb.threads/manythreads.exp DEBUG=1'
+ lappend opts "additional_flags=-DDEBUG"
+}
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $opts] != "" } {
return -1
}
-re "\\\[\[^\]\]* exited\\\]\r\n" {
exp_continue
}
- -re "Thread \[^\n\]* executing\r\n" {
- exp_continue
- }
-re "Program received signal SIGINT.*$gdb_prompt $" {
pass "$message"
}
-re "\\\[\[^\]\]* exited\\\]\r\n" {
exp_continue -continue_timer
}
- -re "Thread \[^\n\]* executing\r\n" {
- exp_continue -continue_timer
- }
-re "Program received signal SIGINT.*$gdb_prompt $" {
if { $failed == 0 } {
fail "check for duplicate SIGINT"
-re "\\\[\[^\]\]* exited\\\]\r\n" {
exp_continue
}
- -re "Thread \[^\n\]* executing\r\n" {
- exp_continue
- }
-re "Program received signal SIGINT.*$gdb_prompt $" {
pass "$message"
}