public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: "Monika Chaddha" <monika@acmet.com>
To: "'Steven J. Hill'" <sjhill@realitydiluted.com>
Cc: <gdb@sources.redhat.com>
Subject: RE: Problems with MIPS disassembly and 'rdhwr' instruction...
Date: Mon, 29 Aug 2005 13:05:00 -0000	[thread overview]
Message-ID: <000a01c5ac9a$81b68250$5100a8c0@monika> (raw)
In-Reply-To: <4312FBC8.1020000@realitydiluted.com>

Hello,

As you have compiled GDB binary for MIPS1 target so it will support only
those instructions which come under MIPS1. In the disassembler table in
file 'src\opcodes\mips-op.c', there is last attribute membership which
is used to mention the architecture tag name. Here it will match the
membership of each instruction with MIPS1 membership name which I think
is I1 and defined as following in same file

#define I1	INSN_ISA1

If it matches then the instruction will be treated as MIPS1 instruction
for disassembly.

{"rdhwr",   "t,K",	0x7c00003b, 0xffe007ff, WR_t,		I33
},

As here I1 is not present in the above entry in last field so GDB is not
printing disassembly of this instruction. You need to just add
membership tag of MIPS1 in the required above opcode entry as following

{"rdhwr",   "t,K",	0x7c00003b, 0xffe007ff, WR_t,		I33|I1
},

Please try this. It should work.

Monika


>-----Original Message-----
>From: gdb-owner@sources.redhat.com
[mailto:gdb-owner@sources.redhat.com] On
>Behalf Of Steven J. Hill
>Sent: Monday, August 29, 2005 5:43 PM
>To: gdb@sources.redhat.com
>Subject: Problems with MIPS disassembly and 'rdhwr' instruction...
>
>Greetings.
>
>I am trying to figure out how to get 'rdhwr' instructions to be
>printed when doing a disassembly in gdb on MIPS binaries. My
>binaries are not compiled as mips32r2, but as mips1. This is
>allowable, but it appears that gdb in 'print_insn_mips' will not
>decoded the 'rdhwr' the instruction because it is a mips1 binary?
>I have spent a couple of hours trying to figure out the hashing
>that is done in that function as well as hacking the loop and I
>have come up with nothing. Can someone help me understand the
>hashing better and suggest a method/patch to allow me to get the
>'rdhwrd' instructions to print instead of the hex opcode? Thanks.
>
>-Steve

  reply	other threads:[~2005-08-29 13:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-29 12:13 Steven J. Hill
2005-08-29 13:05 ` Monika Chaddha [this message]
2005-08-29 13:20   ` Daniel Jacobowitz
2005-08-29 13:46     ` Monika Chaddha
2005-08-30  4:04       ` Steven J. Hill
2005-08-30 12:11         ` Dave Korn

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='000a01c5ac9a$81b68250$5100a8c0@monika' \
    --to=monika@acmet.com \
    --cc=gdb@sources.redhat.com \
    --cc=sjhill@realitydiluted.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).