From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18096 invoked by alias); 4 Mar 2004 15:44:21 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 18057 invoked from network); 4 Mar 2004 15:44:19 -0000 Received: from unknown (HELO alice.acmet.com) (61.11.104.16) by sources.redhat.com with SMTP; 4 Mar 2004 15:44:19 -0000 Received: from monika (localhost [127.0.0.1]) by alice.acmet.com (8.11.6/8.11.6) with ESMTP id i24FlHu07347 for ; Thu, 4 Mar 2004 21:17:17 +0530 From: "Monika Chaddha" To: Subject: Disassembler: Query about 'membership' field in the 'mips_opcode structure' Date: Thu, 04 Mar 2004 15:44:00 -0000 Message-ID: <000a01c401ff$807f6f60$5100a8c0@monika> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03/txt/msg00031.txt.bz2 I am trying to disassemble some instructions (clo,...) under target 'mipsisa32-elf', which are not disassembling properly. In doing so, I have gone through the source in 'mips.h', 'mips-dis.c' and 'mips-opc.c' files. Following are the some of my observations: 1) There is a list of architecture choices maintained in a structure array ('mips-dis.c'). const struct mips_arch_choice mips_arch_choices[] initialized to ...... { "r4000", 1, bfd_mach_mips4000, CPU_R4000, ISA_MIPS3, mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric } ..... { "mips32", 1, bfd_mach_mipsisa32, CPU_MIPS32, ISA_MIPS32 | INSN_MIPS16, mips_cp0_names_mips3264, mips_cp0sel_names_mips3264, ARRAY_SIZE (mips_cp0sel_names_mips3264), mips_hwr_names_numeric }, 2) This array is used by a function 'choose_arch_by_number(mach)' in the same file to make the choice, depending on the value of 'mach' 3) Latter I found that the 'mach' is getting its value from "current_gdbarch->bfd_arch_info->mach" The value is 4000. This value remains to be same irrespective of the architectures. 4) Because of this value I able to disassemble only ISA_MIPS3 set instruction. 5) How do I disassemble ISA_MIPS32 instructions? 6) How do I change my current architecture as "mips32"? 7) Instructions getting disassembled based on 'membership' parameter. There are some macro like I1,I2,I3, I32,.... I have tried I32, but still it is not working. Do we need to do any configuration changes? Thanks Monika.