From: Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
To: cgen@sources.redhat.com
Cc: binutils@sources.redhat.com, gdb-patches@sources.redhat.com
Subject: [PATCH] m32r-*-gdb outputs wrong dissassemble codes for 0x*2 addresses.
Date: Tue, 10 Feb 2004 07:39:00 -0000 [thread overview]
Message-ID: <40288ABC.5090208@renesas.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 596 bytes --]
Hello,
This is a patch to fix the following bug.
gdb outputs wrong disassemble codes for 0x*2 addresses.
(gdb) x/i 0x100
0x100 <__init>: push fp -> push lr
(gdb) x/i 0x102
0x102 <__init+2>: -> st r6,@r0 <== NG
Please commit it and regenerate opcodes/m32r-dis.c.
Regards,
Kazuhiro Inaoka
cgen/ChangeLog
2004-02-10 Kazuhiro Inaoka < inaoka dot kazuhiro at renesas dot com >
* cpu/m32r.opc (my_print_insn): Fixed gdb outputs wrong disassemble
codes for 0x*2 addresses.
opcodes/ChangeLog
2004-02-10 Kazuhiro Inaoka < inaoka dot kazuhiro at renesas dot com >
* m32r-dis.c: Regenerate.
[-- Attachment #2: m32r.opc.patch --]
[-- Type: text/plain, Size: 1547 bytes --]
Index: m32r.opc
===================================================================
RCS file: /cvs/src/src/cgen/cpu/m32r.opc,v
retrieving revision 1.4
diff -c -r1.4 m32r.opc
*** m32r.opc 3 Dec 2003 17:38:50 -0000 1.4
--- m32r.opc 10 Feb 2004 07:14:02 -0000
***************
*** 273,279 ****
/* Read the base part of the insn. */
! status = (*info->read_memory_func) (pc, buf, buflen, info);
if (status != 0)
{
(*info->memory_error_func) (status, pc, info);
--- 273,280 ----
/* Read the base part of the insn. */
! status = (*info->read_memory_func) (pc - ((!big_p && (pc & 3) != 0) ? 2 : 0),
! buf, buflen, info);
if (status != 0)
{
(*info->memory_error_func) (status, pc, info);
***************
*** 286,298 ****
return print_insn (cd, pc, info, buf, buflen);
/* Print the first insn. */
- buf += (big_p ? 0 : 2);
if ((pc & 3) == 0)
{
if (print_insn (cd, pc, info, buf, 2) == 0)
(*info->fprintf_func) (info->stream, UNKNOWN_INSN_MSG);
}
- buf += (big_p ? 2 : -2);
x = (big_p ? &buf[0] : &buf[1]);
if (*x & 0x80)
--- 287,299 ----
return print_insn (cd, pc, info, buf, buflen);
/* Print the first insn. */
if ((pc & 3) == 0)
{
+ buf += (big_p ? 0 : 2);
if (print_insn (cd, pc, info, buf, 2) == 0)
(*info->fprintf_func) (info->stream, UNKNOWN_INSN_MSG);
+ buf += (big_p ? 2 : -2);
}
x = (big_p ? &buf[0] : &buf[1]);
if (*x & 0x80)
next reply other threads:[~2004-02-10 7:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-10 7:39 Kazuhiro Inaoka [this message]
2004-02-13 3:04 ` Ben Elliston
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=40288ABC.5090208@renesas.com \
--to=inaoka.kazuhiro@renesas.com \
--cc=binutils@sources.redhat.com \
--cc=cgen@sources.redhat.com \
--cc=gdb-patches@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).