This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA/m32r] Fix breakpoint bug


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]