* [PATCH] m32r-*-gdb outputs wrong dissassemble codes for 0x*2 addresses.
@ 2004-02-10 7:39 Kazuhiro Inaoka
2004-02-13 3:04 ` Ben Elliston
0 siblings, 1 reply; 2+ messages in thread
From: Kazuhiro Inaoka @ 2004-02-10 7:39 UTC (permalink / raw)
To: cgen; +Cc: binutils, gdb-patches
[-- 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)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] m32r-*-gdb outputs wrong dissassemble codes for 0x*2 addresses.
2004-02-10 7:39 [PATCH] m32r-*-gdb outputs wrong dissassemble codes for 0x*2 addresses Kazuhiro Inaoka
@ 2004-02-13 3:04 ` Ben Elliston
0 siblings, 0 replies; 2+ messages in thread
From: Ben Elliston @ 2004-02-13 3:04 UTC (permalink / raw)
To: cgen; +Cc: binutils, gdb-patches
Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com> writes:
> This is a patch to fix the following bug.
> Please commit it and regenerate opcodes/m32r-dis.c.
Thanks; I've committed the .opc change and have asked for commit
approval to binutils.
Ben
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-02-13 3:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-10 7:39 [PATCH] m32r-*-gdb outputs wrong dissassemble codes for 0x*2 addresses Kazuhiro Inaoka
2004-02-13 3:04 ` Ben Elliston
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).