From patchwork Fri Jul 25 18:09:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maciej W. Rozycki" X-Patchwork-Id: 2179 Received: (qmail 18750 invoked by alias); 25 Jul 2014 18:09:48 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 18724 invoked by uid 89); 25 Jul 2014 18:09:47 -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, 25 Jul 2014 18:09:45 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1XAjw6-0006yS-DS from Maciej_Rozycki@mentor.com for gdb-patches@sourceware.org; Fri, 25 Jul 2014 11:09:42 -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); Fri, 25 Jul 2014 11:09:42 -0700 Received: from localhost (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server (TLS) id 14.2.247.3; Fri, 25 Jul 2014 19:09:40 +0100 Date: Fri, 25 Jul 2014 19:09:35 +0100 From: "Maciej W. Rozycki" To: Subject: [committed] MIPS: Respect the "set mips compression" command Message-ID: User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Hi, This fixes gdbarch matching, making sure one for the opposite compressed ISA variation is not chosen. That in turn makes "set mips compression" work; right now the setting sticks to the initial value, either inferred from the ELF header of the binary first loaded or the default value if no binary has been used. This only affects debugging with no symbol table available or no binary chosen at all, as otherwise symbol annotations determine the compressed ISA variation. Committed. 2014-07-25 Maciej W. Rozycki gdb/ * mips-tdep.c (mips_gdbarch_init): Also check the compressed ISA variation in gdbarch matching. Maciej gdb-mips-tdep-isa.diff Index: gdb-2014.05/gdb/mips-tdep.c =================================================================== --- gdb-2014.05.orig/gdb/mips-tdep.c 2014-07-18 11:02:44.000000000 +0100 +++ gdb-2014.05/gdb/mips-tdep.c 2014-07-19 00:30:44.384830855 +0100 @@ -9172,12 +9172,14 @@ mips_gdbarch_init (struct gdbarch_info i arches != NULL; arches = gdbarch_list_lookup_by_info (arches->next, &info)) { - /* MIPS needs to be pedantic about which ABI the object is - using. */ + /* MIPS needs to be pedantic about which ABI and the compressed + ISA variation the object is using. */ if (gdbarch_tdep (arches->gdbarch)->elf_flags != elf_flags) continue; if (gdbarch_tdep (arches->gdbarch)->mips_abi != mips_abi) continue; + if (gdbarch_tdep (arches->gdbarch)->mips_isa != mips_isa) + continue; /* Need to be pedantic about which register virtual size is used. */ if (gdbarch_tdep (arches->gdbarch)->mips64_transfers_32bit_regs_p