From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24685 invoked by alias); 30 Dec 2014 12:34:10 -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 24670 invoked by uid 89); 30 Dec 2014 12:34:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS 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, 30 Dec 2014 12:34:07 +0000 Received: from svr-orw-fem-02x.mgc.mentorg.com ([147.34.96.206] helo=SVR-ORW-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1Y5vzw-0001ZH-Hs from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Tue, 30 Dec 2014 04:34:04 -0800 Received: from GreenOnly (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.3.224.2; Tue, 30 Dec 2014 04:34:04 -0800 From: Yao Qi To: "Maciej W. Rozycki" CC: Subject: Re: [PATCH] Recognize branch instruction on MIPS in gdb.trace/entry-values.exp References: <1419840861-10723-1-git-send-email-yao@codesourcery.com> Date: Tue, 30 Dec 2014 12:34:00 -0000 In-Reply-To: (Maciej W. Rozycki's message of "Mon, 29 Dec 2014 23:20:39 +0000") Message-ID: <87zja5uxjk.fsf@codesourcery.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2014-12/txt/msg00681.txt.bz2 "Maciej W. Rozycki" writes: > What's the semantics of the test case and the changes you're making?=20= =20 > dwarf assembler is used to generate debug info with DW_TAG_GNU_call_site and DW_TAG_GNU_call_site_parameter to exercise GDB. The change I am making in this patch is to recognize branch instruction on MIPS, so that we can compute the address returned from foo, and fill it in the generated debug info. > I'm asking because the MIPS architecture has several instructions used t= o=20 > make procedure calls, depending on the ISA and ABI selected, and also=20 > compiler options. Besides JAL these instructions include JALS, JALX,=20 > JALR, JALRC, JALRS, BAL and BALS. It looks to me you need to modify the= =20 > pattern here to take these into account; JALRC does not have a delay slot. > I'll update the pattern to {jalrc|(?:jal|bal)[^\r\n]+\r\n} >> All tests in entry-values.exp are PASS. > > Which target and ABI(s) did you ran your testing on? Please try at leas= t=20 > these: o32/MIPS, o32/MIPS16, o32/microMIPS, n64 on a Linux and a=20 > bare-metal target each; testing o32/MIPS16 with the `-mflip-mips16' GCC=20 > option too will be appreciated. These combinations should trigger some=20 > (although not all) of the other possible instructions. To avoid of misunderstanding, let me map them to the following concrete gcc options (I don't find -mabi=3Do32 nor -mabi=3Dn64 in https://gcc.gnu.org/onlinedocs/gcc/MIPS-Options.html), -mabi=3D32=20 -mabi=3D32 -mips16 -mabi=3D32 -mips16 -mflip-mips16 -mabi=3D32 -mmicromips -mabi=3D64 on both linux and bare-metal target are they what you want? --=20 Yao (=E9=BD=90=E5=B0=A7)