From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11424 invoked by alias); 25 Jun 2003 21:47:29 -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 15092 invoked from network); 25 Jun 2003 21:14:46 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.131) by sources.redhat.com with SMTP; 25 Jun 2003 21:14:46 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 26C002B6A; Wed, 25 Jun 2003 17:09:57 -0400 (EDT) Message-ID: <3EFA0FA5.70603@redhat.com> Date: Wed, 25 Jun 2003 21:47:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Fred Fish Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] Don't clobber info->mach in gdb_print_insn_mips References: <20030624005110.4C00F2F2F2C@beeville.vert.intrinsity.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-06/txt/msg00777.txt.bz2 >> So you're ok if I delete that bit of gdb_print_insn_mips? > > > Works for me, though I assume that it was put there for a > reason. The local-to-gdb disasembler functions pre-date libopcodes. I think what's happened is that these wrappers have been accumulating with workarounds to bugs that should have been fixed in libopcodes. `objdump -d' for instance needs to work, and in that situtation the disassembler has no additional information. > Perhaps a better fix is something like: > > if (proc_desc) > { > if (pc_is_mips16 (PROC_LOW_ADDR (proc_desc)) > info->mach = bfd_mach_mips16; > } > else > { > if (pc_is_mips16 (memaddr)) > info->mach = bfd_mach_mips16; > } > > which would leave info->mach alone unless pc_is_mips16 is true. True I'll add it with a comment questioning it's need :-) Andrew