From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11181 invoked by alias); 1 Nov 2013 01:17:07 -0000 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 Received: (qmail 11163 invoked by uid 89); 1 Nov 2013 01:17:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 01 Nov 2013 01:17:05 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1Vc3ME-000173-Ce from Maciej_Rozycki@mentor.com for gdb-patches@sourceware.org; Thu, 31 Oct 2013 18:17:02 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 31 Oct 2013 18:17:02 -0700 Received: from [172.30.64.122] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.2.247.3; Fri, 1 Nov 2013 01:17:00 +0000 Date: Fri, 01 Nov 2013 01:17:00 -0000 From: "Maciej W. Rozycki" To: CC: Stan Shebs Subject: [PATCH] gdb.mi/mi-info-os.exp: Fix cross-debugger testing Message-ID: User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2013-11/txt/msg00001.txt.bz2 Hi, A live target is required for `-info-os' to work in non-native configurations. Here's a fix for gdb.mi/mi-info-os.exp that removes the following failure: (gdb) Expecting: ^(-info-os[ ]+)?(.*\^done,OSDataTable=.*[ ]+[(]gdb[)] [ ]*) -info-os ^error,msg="Don't know how to get OS data. Try \"help target\"." (gdb) FAIL: gdb.mi/mi-info-os.exp: -info-os Tested with mips-linux-gnu (crossed from i686-linux-gnu). OK to apply? 2011-11-01 Maciej W. Rozycki gdb/testsuite/ * gdb.mi/mi-info-os.exp: Connect to the target in non-native configurations. Maciej gdb-test-mi-info-os.diff Index: gdb-fsf-trunk-quilt/gdb/testsuite/gdb.mi/mi-info-os.exp =================================================================== --- gdb-fsf-trunk-quilt.orig/gdb/testsuite/gdb.mi/mi-info-os.exp 2013-11-01 00:52:48.000000000 +0000 +++ gdb-fsf-trunk-quilt/gdb/testsuite/gdb.mi/mi-info-os.exp 2013-11-01 00:56:43.588756235 +0000 @@ -33,6 +33,20 @@ if [mi_gdb_start] { continue } +# In non-native configurations we need to have a live target. +if { ![isnative] } { + standard_testfile basics.c + + if [build_executable "Failed to build $testfile" $testfile $srcfile \ + debug] { + return -1; + } + + if {[mi_run_to_main] < 0} { + return -1 + } +} + # Try the argument-less form that lists all the types in a table. mi_gdb_test "-info-os" ".*\\^done,OSDataTable=.*" "-info-os"