Note, I've only done one of the several tests here -- if this change is approved, I'll change the others the same way. This patch is to make the reverse debugging tests auto-detect the targets that they can run on, to eliminate the need for using a board description file to run them. It's tricky, because we have to detect several different kinds of targets: 1) Native Linux, which can be detected early, and 2) Remote targets that answer the qSupported probe appropriately, which can't be tested until after gdb connects to the target. So I've made two changes: 1) In place of "if ![target_info exists gdb,can_reverse]" substitute +if [istarget "*linux*"] then { + if { ![istarget "i?86-*linux*"] && ![istarget "amd64-*linux*"] } then { + # test process record on i?86 and amd64 linux + return; + } +} and 2) After "runto main", this substitution: -if [target_info exists gdb,use_precord] { - # Activate process record/replay - gdb_test "record" "" "Turn on process record" - # FIXME: command ought to acknowledge, so we can test if it succeeded. +if ![target_info exists use_gdb_stub] then { + if { [istarget "i?86-*linux*"] || [istarget "amd64-*linux*"] } then { + # Activate process record/replay + gdb_test "record" "" "Turn on process record" + # FIXME: command ought to acknowledge, so we can test if it succeeded. + } +} + +if [target_info exists use_gdb_stub] then { + send_gdb "show remote reverse-continue\n" + gdb_expect { + -re ".* currently enabled.*$gdb_prompt " { + } + -re ".*$gdb_prompt " { + return + } + } }