From: "Monika Chaddha" <monika@acmet.com>
To: <gdb@sources.redhat.com>
Subject: Disassembler: Query about 'membership' field in the 'mips_opcode structure'
Date: Thu, 04 Mar 2004 15:44:00 -0000 [thread overview]
Message-ID: <000a01c401ff$807f6f60$5100a8c0@monika> (raw)
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.
next reply other threads:[~2004-03-04 15:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-04 15:44 Monika Chaddha [this message]
2004-03-05 5:09 ` Andrew Cagney
2004-03-16 7:15 ` Monika Chaddha
2004-03-18 6:18 Monika Chaddha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000a01c401ff$807f6f60$5100a8c0@monika' \
--to=monika@acmet.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox