From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10234 invoked by alias); 19 May 2012 01:09:59 -0000 Received: (qmail 10201 invoked by uid 22791); 19 May 2012 01:09:58 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-gg0-f169.google.com (HELO mail-gg0-f169.google.com) (209.85.161.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 19 May 2012 01:09:36 +0000 Received: by ggm4 with SMTP id 4so4139856ggm.0 for ; Fri, 18 May 2012 18:09:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:subject:from:to:date:organization:content-type:x-mailer :content-transfer-encoding:mime-version:x-gm-message-state; bh=ZsF3pHRkkUJaOdfNRqgSe3a9X/8a4xi17g+0pa9NANY=; b=dVVjO5Ibr1kk9qE21O0NLQ1MK3Rz0M8t7be8MEl1q/FGh64pzs4z632PvqJvjc3cr1 N4YhsZXPDFgxlg+Va2Ph11/y6g8DrCJqXJ4PpNA/ZMd6sCSPzmNbo4hJuksN3LU9V04z mUMCsxb2uMv/D0IIRdFmI+Qyz2yeptlAzVUm5vCPxA39uloGa+0YGSS6Emu+WT7I5JWi xxe7MWBrV7CdW7mlH2fqpYFV64owzMK6CTRLwG092w4ES4O//NOjkhq8DDoTSC+EbIzY BpO9XnKHYQ19mO5i8MqAG8b3q+LeGsiT+3Xk17cr/j/a0hMI1DFWm+xFfZFjNl1/puf+ a9Sg== Received: by 10.236.75.234 with SMTP id z70mr14984364yhd.5.1337389775728; Fri, 18 May 2012 18:09:35 -0700 (PDT) Received: from [192.168.1.50] (201.86.25.48.dynamic.adsl.gvt.net.br. [201.86.25.48]) by mx.google.com with ESMTPS id g66sm32687809yhf.15.2012.05.18.18.09.33 (version=SSLv3 cipher=OTHER); Fri, 18 May 2012 18:09:34 -0700 (PDT) Message-ID: <1337389771.29226.3.camel@hactar> Subject: [commit][obvious] Fix testsuite/gdb.python/py-prompt.exp when cross-debugging From: Thiago Jung Bauermann To: gdb-patches ml Date: Sat, 19 May 2012 01:09:00 -0000 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 X-Gm-Message-State: ALoCoQmKgXkWZOZDaEXpnyHLs44TkQkeaN1ufsXHjitF1Gr++uuyrM68CXj58uA7/lI5Mk3bNc1m 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: 2012-05/txt/msg00726.txt.bz2 Hello, py-prompt.exp execs the test file directly to get its PID so that it can attach to it later. It borrows the technique from gdb.server/ext-attach.exp. This doesn't work when the target is of a different architecture than the host. This patch does what ext-attach.exp does, which is to quit if the target is remote. Committed as obvious. -- []'s Thiago Jung Bauermann Linaro Toolchain Working Group 2012-05-18 Thiago Jung Bauermann * gdb.python/py-prompt.exp: Quit if the target is remote. diff --git a/gdb/testsuite/gdb.python/py-prompt.exp b/gdb/testsuite/gdb.python/py-prompt.exp index eacb074..ab17ab9 100644 --- a/gdb/testsuite/gdb.python/py-prompt.exp +++ b/gdb/testsuite/gdb.python/py-prompt.exp @@ -20,6 +20,10 @@ set testfile "py-prompt" set srcfile ${testfile}.c set binfile ${objdir}/${subdir}/${testfile} +# We need to use TCL's exec to get the pid. +if [is_remote target] then { + return 0 +} load_lib gdb-python.exp load_lib prompt.exp