From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15880 invoked by alias); 31 Mar 2003 23:11:14 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 15873 invoked from network); 31 Mar 2003 23:11:14 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 31 Mar 2003 23:11:14 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h2VNBEQ08547 for ; Mon, 31 Mar 2003 18:11:14 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h2VNBEV24523 for ; Mon, 31 Mar 2003 18:11:14 -0500 Received: from localhost.localdomain (vpn50-55.rdu.redhat.com [172.16.50.55]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h2VNBCU13585 for ; Mon, 31 Mar 2003 18:11:12 -0500 Received: (from kev@localhost) by localhost.localdomain (8.11.6/8.11.6) id h2VNB6o23362 for gdb-patches@sources.redhat.com; Mon, 31 Mar 2003 16:11:06 -0700 Date: Mon, 31 Mar 2003 23:11:00 -0000 From: Kevin Buettner Message-Id: <1030331231105.ZM23361@localhost.localdomain> To: gdb-patches@sources.redhat.com Subject: [RFA] MIPS: Add mappings for HI and LO registers MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-03/txt/msg00622.txt.bz2 I've recently submitted some gcc patches which add debug info related mappings for the MIPS "hi" and "lo" registers. (Previously, if either of these appeared in DWARF 2 debug output, they'd show up as -1.) The patch below adds the corresponding code for mapping these registers from values that'll (hopefully soon) appear in debug info to gdb's internal register numbers. The most recent patch on the gcc side is: http://gcc.gnu.org/ml/gcc-patches/2003-03/msg02596.html Okay? (If so, I'll wait for approval on the gcc side before committing this patch.) * mips-tdep.c (mips_dwarf_dwarf2_ecoff_reg_to_regnum) (mips_stab_reg_to_regnum): Add mappings for HI_REGNUM and LO_REGNUM. Index: mips-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mips-tdep.c,v retrieving revision 1.178 diff -u -p -r1.178 mips-tdep.c --- mips-tdep.c 26 Mar 2003 22:39:52 -0000 1.178 +++ mips-tdep.c 31 Mar 2003 22:49:23 -0000 @@ -5573,6 +5573,10 @@ mips_stab_reg_to_regnum (int num) return num; else if (num >= 38 && num < 70) return num + FP0_REGNUM - 38; + else if (num == 70) + return HI_REGNUM; + else if (num == 71) + return LO_REGNUM; else { /* This will hopefully (eventually) provoke a warning. Should @@ -5591,6 +5595,10 @@ mips_dwarf_dwarf2_ecoff_reg_to_regnum (i return num; else if (num >= 32 && num < 64) return num + FP0_REGNUM - 32; + else if (num == 64) + return HI_REGNUM; + else if (num == 65) + return LO_REGNUM; else { /* This will hopefully (eventually) provoke a warning. Should