[RFA/m32r] Fix breakpoint bug of m32rsdi protocol; remote-m32r-sdi.c re-indented.

Andrew Cagney cagney@gnu.org
Fri Jul 16 21:31:00 GMT 2004


Kei,

It looks like some re-indentation got mixed in with the change proper vis:

-  if (!sdi_desc)
+  if (!sdi_desc)

-  if (c != '+')                /* error */
+  if (c != '+')                        /* error */

...

I've committed the attached which re-indents remote-m32r-sdi.c using
gdb/gdb_indent.sh.  You'll want to merge in that change and strip out
any other stray mods.

Looking at the change proper, given the many occurances of sequences
like this:

+      buf[0] = SDI_WRITE_MEMORY;
+      store_long_parameter (buf + 1, 0xffff8080 + 4 * i);
+      store_long_parameter (buf + 5, 4);
+      store_unsigned_integer (buf + 9, 4, bp_addr);
+      send_data (buf, 13);

+      buf[0] = SDI_WRITE_MEMORY;
+      store_long_parameter (buf + 1, 0xffff8200 + 4 * i);
+      store_long_parameter (buf + 5, 4);
+      store_long_parameter (buf + 9, 0xffffffff);
+      send_data (buf, 13);

+      buf[0] = SDI_WRITE_MEMORY;
+      store_long_parameter (buf + 1, bp_addr);
+      store_long_parameter (buf + 5, 4);
+         if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+           {
+             buf[9] = dbt_bp_entry[0];
+             buf[10] = dbt_bp_entry[1];
+             buf[11] = dbt_bp_entry[2];
+             buf[12] = dbt_bp_entry[3];
+           }
+         else
+           {
+             buf[9] = dbt_bp_entry[3];
+             buf[10] = dbt_bp_entry[2];
+             buf[11] = dbt_bp_entry[1];
+             buf[12] = dbt_bp_entry[0];

can you add helper functions like:
  send_l4_data (SDI_WRITE_MEMORY, 0xffff8200 + 4 * i, 4, 0xffffffff);
for each of these cases (and any others you feel useful).

Andrew
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20040716/baf77cf4/attachment.ksh>


More information about the Gdb-patches mailing list