From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 105475 invoked by alias); 30 Jun 2017 00:19:07 -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 105428 invoked by uid 89); 30 Jun 2017 00:19:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Delegate X-Spam-User: qpsmtpd, 2 recipients X-HELO: mailapp01.imgtec.com Received: from mailapp01.imgtec.com (HELO mailapp01.imgtec.com) (195.59.15.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 30 Jun 2017 00:19:04 +0000 Received: from HHMAIL01.hh.imgtec.org (unknown [10.100.10.19]) by Forcepoint Email with ESMTPS id B705D5662D72C; Fri, 30 Jun 2017 01:19:00 +0100 (IST) Received: from [10.20.78.60] (10.20.78.60) by HHMAIL01.hh.imgtec.org (10.100.10.21) with Microsoft SMTP Server id 14.3.294.0; Fri, 30 Jun 2017 01:19:01 +0100 Date: Fri, 30 Jun 2017 00:19:00 -0000 From: "Maciej W. Rozycki" To: Yao Qi CC: , Subject: Re: [PATCH 2/6] Delegate opcodes to select disassembler in GDB In-Reply-To: <1494931698-15309-3-git-send-email-yao.qi@linaro.org> Message-ID: References: <1494931698-15309-1-git-send-email-yao.qi@linaro.org> <1494931698-15309-3-git-send-email-yao.qi@linaro.org> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2017-06/txt/msg00812.txt.bz2 Hi Yao, On Tue, 16 May 2017, Yao Qi wrote: > This patch removes the logic in GDB and calls > opcodes/disassemble.c:disassembler in default to select disassembler. This change causes an assertion failure when trying to disassemble a MIPS16 function: (gdb) disassemble main Dump of assembler code for function main: 0x00400209 <+0>: .../gdb/arch-utils.c:979: internal-error: int default_print_insn(bfd_vma, disassemble_info*): Assertion `info->mach == bfd_get_mach (exec_bfd)' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) This is because `info->mach' is 16 (the `bfd_mach_mips16' aka `mips:16' BFD) whereas `bfd_get_mach (exec_bfd)' is 33 (the `bfd_mach_mipsisa32r2' aka `mips:isa32r2' BFD). This is expected for MIPS16 code within a program that has been built for the MIPS32r2 ISA; see `gdb_print_insn_mips' for the origin. So what's the purpose of this assertion? Maciej