From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14831 invoked by alias); 13 May 2014 04:10:08 -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 14805 invoked by uid 89); 13 May 2014 04:10:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.0 required=5.0 tests=none 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; Tue, 13 May 2014 04:10:05 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1Wk42U-0002GK-2d from Hui_Zhu@mentor.com for gdb-patches@sourceware.org; Mon, 12 May 2014 21:10:02 -0700 Received: from SVR-ORW-FEM-06.mgc.mentorg.com ([147.34.97.120]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Mon, 12 May 2014 21:10:01 -0700 Received: from localhost.localdomain (147.34.91.1) by SVR-ORW-FEM-06.mgc.mentorg.com (147.34.97.120) with Microsoft SMTP Server id 14.2.247.3; Mon, 12 May 2014 21:10:01 -0700 Message-ID: <53719B17.5000208@mentor.com> Date: Tue, 13 May 2014 04:10:00 -0000 From: Hui Zhu User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: gdb-patches ml Subject: [PATCH] Fix ptype.exp fail in MIPS Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-05/txt/msg00145.txt.bz2 ptype $pc type = int32_t (gdb) FAIL: gdb.base/ptype.exp: ptype $pc This is because the $pc register in MIPS is set to int but not code_ptr. And according to the discussion in https://sourceware.org/ml/gdb/2013-06/msg00020.html, the type cannot be changed. So I make a patch for ptype.exp. Thanks, Hui 2014-05-13 Hui Zhu * gdb.base/ptype.exp: Add special "ptype $pc" test for MIPS. Index: gdb-trunk/gdb/testsuite/gdb.base/ptype.exp =================================================================== --- gdb-trunk.orig/gdb/testsuite/gdb.base/ptype.exp 2014-05-12 19:55:30.759020736 -0700 +++ gdb-trunk/gdb/testsuite/gdb.base/ptype.exp 2014-05-12 20:42:18.057516141 -0700 @@ -631,5 +631,9 @@ set timeout $prev_timeout # Test ptype of user register - gdb_test "ptype \$pc" "void \\(\\*\\)\\(\\)" "ptype \$pc" + if { ![istarget "mips*-*-*"] } then { + gdb_test "ptype \$pc" "void \\(\\*\\)\\(\\)" "ptype \$pc" + } else { + gdb_test "ptype \$pc" "int.*|long.*" "ptype \$pc" + } }