This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] bugfix of m32r remote debug
- From: Kei Sakamoto <sakamoto dot kei at renesas dot com>
- To: "gdb-patches at sources dot redhat dot com" <gdb-patches at sources dot redhat dot com>
- Date: Wed, 09 Nov 2005 16:26:31 +0900
- Subject: [commit] bugfix of m32r remote debug
Hello,
The attached patch fixes two bugs in remote-m32r-sdi.c.
Both of them are related with breakpoints by DBT instructions.
This patch affects only the remote debug of m32r targets.
I committed it on the mainline and gdb-6_4 branch.
Kei Sakamoto
===
2005-11-09 Kei Sakamoto <sakamoto.kei@renesas.com>
* remote-m32r-sdi.c: Update copyright years.
(m32r_resume): Write DBT at word-aligned addresses.
(m32r_wait): Use SDI_WRITE_MEMORY to remove DBT.
Index: remote-m32r-sdi.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-m32r-sdi.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- remote-m32r-sdi.c 8 Nov 2005 05:54:22 -0000 1.14
+++ remote-m32r-sdi.c 9 Nov 2005 07:09:05 -0000 1.15
@@ -1,6 +1,6 @@
/* Remote debugging interface for M32R/SDI.
- Copyright 2003, 2004 Free Software Foundation, Inc.
+ Copyright 2003, 2004, 2005 Free Software Foundation, Inc.
Contributed by Renesas Technology Co.
Written by Kei Sakamoto <sakamoto.kei@renesas.com>.
@@ -534,7 +534,7 @@
/* Write DBT instruction. */
buf[0] = SDI_WRITE_MEMORY;
- store_long_parameter (buf + 1, bp_addr);
+ store_long_parameter (buf + 1, (bp_addr & 0xfffffffc));
store_long_parameter (buf + 5, 4);
if ((bp_addr & 2) == 0 && bp_addr != (pc_addr & 0xfffffffc))
{
@@ -810,7 +810,7 @@
{
if (!mmu_on)
bp_addr &= 0x7fffffff;
- buf[0] = SDI_READ_MEMORY;
+ buf[0] = SDI_WRITE_MEMORY;
store_long_parameter (buf + 1, bp_addr & 0xfffffffc);
store_long_parameter (buf + 5, 4);
buf[9] = bp_data[i][0];