From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30404 invoked by alias); 11 Sep 2009 20:49:22 -0000 Received: (qmail 30396 invoked by uid 22791); 11 Sep 2009 20:49:22 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.115.85.69) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 11 Sep 2009 20:49:18 +0000 Received: from jupiter.vmware.com (mailhost5.vmware.com [10.16.68.131]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id AD0863800A for ; Fri, 11 Sep 2009 13:49:16 -0700 (PDT) Received: from [10.20.94.141] (msnyder-server.eng.vmware.com [10.20.94.141]) by jupiter.vmware.com (Postfix) with ESMTP id 9ECB6DC059 for ; Fri, 11 Sep 2009 13:49:16 -0700 (PDT) Message-ID: <4AAAB750.8000209@vmware.com> Date: Fri, 11 Sep 2009 20:49:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: "gdb-patches@sourceware.org" Subject: [RFA] reverse debugging tests Content-Type: multipart/mixed; boundary="------------050100020506000101090301" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00333.txt.bz2 This is a multi-part message in MIME format. --------------050100020506000101090301 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1634 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 + } + } } --------------050100020506000101090301 Content-Type: text/plain; name="reversetests.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="reversetests.txt" Content-length: 1614 2009-09-11 Michael Snyder * gdb.reverse/step-reverse.exp: Explicitly check for targets that can support reverse debuggnig. Index: step-reverse.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.reverse/step-reverse.exp,v retrieving revision 1.2 diff -u -p -r1.2 step-reverse.exp --- step-reverse.exp 14 Jul 2009 20:17:26 -0000 1.2 +++ step-reverse.exp 11 Sep 2009 19:14:19 -0000 @@ -20,8 +20,11 @@ # Test step and next in reverse # -if ![target_info exists gdb,can_reverse] { - return +if [istarget "*linux*"] then { + if { ![istarget "i?86-*linux*"] && ![istarget "amd64-*linux*"] } then { + # test process record on i?86 and amd64 linux + return; + } } set testfile "step-reverse" @@ -33,10 +36,23 @@ if { [prepare_for_testing $testfile.exp runto main -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 + } + } } # plain vanilla step/next (no count) --------------050100020506000101090301--