* gdb.exp (supports_process_record): New.
(supports_reverse): New.
* gdb.reverse/break-precsave.exp: Call support_process_record
to run test conditionally.
* gdb.reverse/consecutive-precsave.exp: Likewise.
* gdb.reverse/i386-precsave.exp: Likewise.
* gdb.reverse/machinestate-precsave.exp: Likewise.
* gdb.reverse/solib-precsave.exp: Likewise.
* gdb.reverse/step-precsave.exp: Likewise.
* gdb.reverse/until-precsave.exp: Likewise.
* gdb.reverse/watch-precsave.exp: Likewise.
* gdb.reverse/break-reverse.exp: Call support_reverse to run
test conditionally.
* gdb.reverse/consecutive-reverse.exp: Likewise.
* gdb.reverse/finish-precsave.exp: Likewise.
* gdb.reverse/finish-reverse-bkpt.exp: Likewise.
* gdb.reverse/finish-reverse.exp: Likewise.
* gdb.reverse/i386-reverse.exp: Likewise.
* gdb.reverse/i386-sse-reverse.exp: Likewise.
* gdb.reverse/machinestate.exp: Likewise.
* gdb.reverse/next-reverse-bkpt-over-sr.exp: Likewise.
* gdb.reverse/sigall-precsave.exp: Likewise.
* gdb.reverse/sigall-reverse.exp: Likewise.
* gdb.reverse/solib-reverse.exp: Likewise.
* gdb.reverse/step-reverse.exp: Likewise.
* gdb.reverse/until-reverse.exp: Likewise.
* gdb.reverse/watch-reverse.exp: Likewise.
+2011-11-08 Yao Qi <yao@codesourcery.com>
+
+ * gdb.exp (supports_process_record): New.
+ (supports_reverse): New.
+ * gdb.reverse/break-precsave.exp: Call support_process_record
+ to run test conditionally.
+ * gdb.reverse/consecutive-precsave.exp: Likewise.
+ * gdb.reverse/i386-precsave.exp: Likewise.
+ * gdb.reverse/machinestate-precsave.exp: Likewise.
+ * gdb.reverse/solib-precsave.exp: Likewise.
+ * gdb.reverse/step-precsave.exp: Likewise.
+ * gdb.reverse/until-precsave.exp: Likewise.
+ * gdb.reverse/watch-precsave.exp: Likewise.
+ * gdb.reverse/break-reverse.exp: Call support_reverse to run
+ test conditionally.
+ * gdb.reverse/consecutive-reverse.exp: Likewise.
+ * gdb.reverse/finish-precsave.exp: Likewise.
+ * gdb.reverse/finish-reverse-bkpt.exp: Likewise.
+ * gdb.reverse/finish-reverse.exp: Likewise.
+ * gdb.reverse/i386-reverse.exp: Likewise.
+ * gdb.reverse/i386-sse-reverse.exp: Likewise.
+ * gdb.reverse/machinestate.exp: Likewise.
+ * gdb.reverse/next-reverse-bkpt-over-sr.exp: Likewise.
+ * gdb.reverse/sigall-precsave.exp: Likewise.
+ * gdb.reverse/sigall-reverse.exp: Likewise.
+ * gdb.reverse/solib-reverse.exp: Likewise.
+ * gdb.reverse/step-reverse.exp: Likewise.
+ * gdb.reverse/until-reverse.exp: Likewise.
+ * gdb.reverse/watch-reverse.exp: Likewise.
+
2011-11-05 Yao Qi <yao@codesourcery.com>
* gdb.trace/trace-break.exp: Add test on setting two
# with breakpoints in a process record logfile.
# This test suitable only for process record-replay
-if ![target_info exists gdb,use_precord] {
+if ![supports_process_record] {
return
}
runto main
-if [target_info exists gdb,use_precord] {
+if [supports_process_record] {
# Activate process record/replay
gdb_test_no_output "record" "Turn on process record"
}
# This file is part of the GDB testsuite. It tests reverse debugging
# with breakpoints.
-if ![target_info exists gdb,can_reverse] {
+if ![supports_reverse] {
return
}
runto main
-if [target_info exists gdb,use_precord] {
+if [supports_process_record] {
# Activate process record/replay
gdb_test_no_output "record" "Turn on process record"
}
# consecutive instructions in a process record logfile.
# This test suitable only for process record-replay
-if ![target_info exists gdb,use_precord] {
+if ![supports_process_record] {
return
}
runto main
-if [target_info exists gdb,use_precord] {
+if [supports_process_record] {
# Activate process record/replay
gdb_test_no_output "record" "Turn on process record"
}
# This file is part of the GDB testsuite. It tests stepping over
# consecutive instructions in reverse.
-if ![target_info exists gdb,can_reverse] {
+if ![supports_reverse] {
return
}
runto main
-if [target_info exists gdb,use_precord] {
+if [supports_process_record] {
# Activate process record/replay
gdb_test_no_output "record" "Turn on process record"
}
# This file is part of the GDB testsuite. It tests 'finish' with
# reverse debugging.
-if ![target_info exists gdb,can_reverse] {
+if ![supports_reverse] {
return
}
runto main
-if [target_info exists gdb,use_precord] {
+if [supports_process_record] {
# Activate process record/replay
gdb_test_no_output "record" "Turn on process record"
}
# the functions entry would be ignored. Make sure the bug doesn't
# reappear.
-if ![target_info exists gdb,can_reverse] {
+if ![supports_reverse] {
return
}
return 0
}
-if [target_info exists gdb,use_precord] {
+if [supports_process_record] {
# Activate process record/replay
gdb_test_no_output "record" "Turn on process record"
}
# This file is part of the GDB testsuite. It tests 'finish' with
# reverse debugging.
-if ![target_info exists gdb,can_reverse] {
+if ![supports_reverse] {
return
}
runto main
-if [target_info exists gdb,use_precord] {
+if [supports_process_record] {
# Activate process record/replay
gdb_test_no_output "record" "Turn on process record"
}
#
# This test suitable only for process record-replay
-if ![target_info exists gdb,use_precord] {
+if ![supports_process_record] {
return
}
gdb_load ${binfile}
runto main
-if [target_info exists gdb,use_precord] {
+if [supports_process_record] {
# Activate process record/replay
gdb_test_no_output "record" "Turn on process record"
}
# This test tests some i386 general instructions for reverse execution.
#
-if ![target_info exists gdb,can_reverse] {
+if ![supports_reverse] {
return
}
gdb_load ${binfile}
runto main
-if [target_info exists gdb,use_precord] {
+if [supports_process_record] {
# Activate process record/replay
gdb_test_no_output "record" "Turn on process record"
}
# This test tests some i386 general instructions for reverse execution.
#
-if ![target_info exists gdb,can_reverse] {
+if ![supports_reverse] {
return
}
gdb_load ${binfile}
runto main
-if [target_info exists gdb,use_precord] {
+if [supports_process_record] {
# Activate process record/replay
gdb_test_no_output "record" "Turn on process record"
}
#
# This test suitable only for process record-replay
-if ![target_info exists gdb,use_precord] {
+if ![supports_process_record] {
return
}
runto main
-if [target_info exists gdb,use_precord] {
+if [supports_process_record] {
# Activate process record/replay
gdb_test_no_output "record" "Turn on process record"
}
# Test forward replay
#
-if ![target_info exists gdb,can_reverse] {
+if ![supports_reverse] {
return
}
runto main
-if [target_info exists gdb,use_precord] {
+if [supports_process_record] {
# Activate process record/replay
gdb_test_no_output "record" "Turn on process record"
}
# the same location as the step-resume breakpoint isn't ignored.
#
-if ![target_info exists gdb,can_reverse] {
+if ![supports_reverse] {
return
}
return 0
}
-if [target_info exists gdb,use_precord] {
+if [supports_process_record] {
# Activate process record/replay
gdb_test_no_output "record" "Turn on process record"
}
return
}
-if ![target_info exists gdb,can_reverse] {
+if ![supports_reverse] {
return
}
runto gen_ABRT
-if [target_info exists gdb,use_precord] {
+if [supports_process_record] {
# Activate process record/replay
gdb_test_no_output "record" "Turn on process record"
}
return
}
-if ![target_info exists gdb,can_reverse] {
+if ![supports_reverse] {
return
}
runto gen_ABRT
-if [target_info exists gdb,use_precord] {
+if [supports_process_record] {
# Activate process record/replay
gdb_test_no_output "record" "Turn on process record"
}
# with shared libraries and a logfile.
# This test suitable only for process record-replay
-if ![target_info exists gdb,use_precord] {
+if ![supports_process_record] {
return
}
runto main
-if [target_info exists gdb,use_precord] {
+if [supports_process_record] {
# Activate process record/replay
gdb_test_no_output "record" "Turn on process record"
}
# This file is part of the GDB testsuite. It tests reverse debugging
# with shared libraries.
-if ![target_info exists gdb,can_reverse] {
+if ![supports_reverse] {
return
}
runto main
-if [target_info exists gdb,use_precord] {
+if [supports_process_record] {
# Activate process record/replay
gdb_test_no_output "record" "Turn on process record"
}
#
# This test suitable only for process record-replay
-if ![target_info exists gdb,use_precord] {
+if ![supports_process_record] {
return
}
runto main
-if [target_info exists gdb,use_precord] {
+if [supports_process_record] {
# Activate process record/replay
gdb_test_no_output "record" "Turn on process record"
}
# Test step and next in reverse
#
-if ![target_info exists gdb,can_reverse] {
+if ![supports_reverse] {
return
}
runto main
-if [target_info exists gdb,use_precord] {
+if [supports_process_record] {
# Activate process record/replay
gdb_test_no_output "record" "Turn on process record"
}
# 'advance' in precord logfile.
# This test suitable only for process record-replay
-if ![target_info exists gdb,use_precord] {
+if ![supports_process_record] {
return
}
runto main
-if [target_info exists gdb,use_precord] {
+if [supports_process_record] {
# Activate process record/replay
gdb_test_no_output "record" "Turn on process record"
}
# This file is part of the GDB testsuite. It tests 'until' and
# 'advance' in reverse debugging.
-if ![target_info exists gdb,can_reverse] {
+if ![supports_reverse] {
return
}
runto main
-if [target_info exists gdb,use_precord] {
+if [supports_process_record] {
# Activate process record/replay
gdb_test_no_output "record" "Turn on process record"
}
# debugging with watchpoints.
# This test suitable only for process record-replay
-if ![target_info exists gdb,use_precord] {
+if ![supports_process_record] {
return
}
runto main
-if [target_info exists gdb,use_precord] {
+if [supports_process_record] {
# Activate process record/replay
gdb_test_no_output "record" "Turn on process record"
}
# with watchpoints.
-if ![target_info exists gdb,can_reverse] {
+if ![supports_reverse] {
return
}
runto main
-if [target_info exists gdb,use_precord] {
+if [supports_process_record] {
# Activate process record/replay
gdb_test_no_output "record" "Turn on process record"
}
return 1
}
+# Return 1 if target supports process record, otherwise return 0.
+
+proc supports_process_record {} {
+
+ if [target_info exists gdb,use_precord] {
+ return [target_info gdb,use_precord]
+ }
+
+ if { [istarget "x86_64-*-linux*"] || [istarget "i\[34567\]86-*-linux*"] } {
+ return 1
+ }
+
+ return 0
+}
+
+# Return 1 if target supports reverse debugging, otherwise return 0.
+
+proc supports_reverse {} {
+
+ if [target_info exists gdb,can_reverse] {
+ return [target_info gdb,can_reverse]
+ }
+
+ if { [istarget "x86_64-*-linux*"] || [istarget "i\[34567\]86-*-linux*"] } {
+ return 1
+ }
+
+ return 0
+}
+
# Return 1 if target is ILP32.
# This cannot be decided simply from looking at the target string,
# as it might depend on externally passed compiler options like -m64.