This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
RE: Disassembler: Query about 'membership' field in the 'mips_opcode structure'
- From: "Vineet Sharma, Noida" <vineets at noida dot hcltech dot com>
- To: Monika Chaddha <monika at acmet dot com>, gdb at sources dot redhat dot com
- Date: Fri, 5 Mar 2004 09:19:03 +0530
- Subject: RE: Disassembler: Query about 'membership' field in the 'mips_opcode structure'
Hi,
I think you have to rerun the configure script with proper
target(mips32), and then run "make" and "make install". Then all target and
realted info would be what you want.
Hope it helps you
Regards
Vineet
-----Original Message-----
From: gdb-owner@sources.redhat.com
[mailto:gdb-owner@sources.redhat.com]On Behalf Of Monika Chaddha
Sent: Thursday, March 04, 2004 9:14 PM
To: gdb@sources.redhat.com
Subject: Disassembler: Query about 'membership' field in the
'mips_opcode structure'
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.