[RFA/m32r] Fix breakpoint bug

Daniel Jacobowitz drow@false.org
Mon Oct 25 16:19:00 GMT 2004


On Thu, Oct 07, 2004 at 03:31:07PM +0900, Kei Sakamoto wrote:
> Hello,
> 
> m32r-tdep.c can't handle breakpoints on instructions executed
> in parallel. It does not remove unnecessary parallel execution
> bit from instructions and causes illegal instruction errors.
> 
> The attached patch fixes this problem.
> 
> OK to commit?
> 
> 2004-10-07    Kei Sakamoto  <sakamoto.kei@renesas.com>
> 
>     * m32r-tdep.c (m32r_memory_insert_breakpoint): Remove
>     unnecessary parallel execution bit.
>     (m32r_memory_remove_breakpoint): Ditto.
>     (m32r_breakpoint_from_pc): Update.

I'm curious about the little endian case:

+  else				/* little-endian */
+    {
+      if ((addr & 3) == 0)
+	{
+	  buf[0] = contents_cache[0];
+	  buf[1] = contents_cache[1] & 0x7f;
+	  buf[2] = bp_entry[1];
+	  buf[3] = bp_entry[0];
 	}

Shouldn't the breakpoint be placed at buf[0] here rather than buf[2]?


-- 
Daniel Jacobowitz



More information about the Gdb-patches mailing list