# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 57a9050389073ddcd23a1da377904b42ea70941b
# Parent b0d8b38681ff70a7d0fa02eae8f7561c1d28c08c
Fix additional gdbstub issues.
- gdbstub.h uses atomic_t and PAGE_SIZE, so include those headers
- do not lie about setting breakpoints
- fix memory writing
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
diff -r b0d8b38681ff -r 57a905038907 xen/common/gdbstub.c
--- a/xen/common/gdbstub.c Mon Mar 6 22:47:53 2006
+++ b/xen/common/gdbstub.c Mon Mar 6 22:49:48 2006
@@ -348,7 +348,10 @@
}
}
- gdb_write_to_packet_str((x != length) ? "OK" : "E11", ctx);
+ if (x == length)
+ gdb_write_to_packet_str("OK", ctx);
+ else
+ gdb_write_to_packet_str("E11", ctx);
dbg_printk("Write done.\n");
@@ -397,13 +400,18 @@
break;
case 'M': /* Write memory */
addr = simple_strtoul(ctx->in_buf + 1, &ptr, 16);
- if ( (ptr == (ctx->in_buf + 1)) || (ptr[0] != ':') )
+ if ( (ptr == (ctx->in_buf + 1)) || (ptr[0] != ',') )
{
gdb_send_reply("E03", ctx);
return 0;
}
length = simple_strtoul(ptr + 1, &ptr, 16);
- gdb_cmd_write_mem(addr, length, ptr, ctx);
+ if ( ptr[0] != ':')
+ {
+ gdb_send_reply("E04", ctx);
+ return 0;
+ }
+ gdb_cmd_write_mem(addr, length, ptr + 1, ctx);
break;
case 'p': /* read register */
addr = simple_strtoul(ctx->in_buf + 1, &ptr, 16);
@@ -419,12 +427,6 @@
}
gdb_arch_read_reg(addr, regs, ctx);
break;
- case 'Z': /* We need to claim to support these or gdb
- won't let you continue the process. */
- case 'z':
- gdb_send_reply("OK", ctx);
- break;
-
case 'D':
ctx->currently_attached = 0;
gdb_send_reply("OK", ctx);
diff -r b0d8b38681ff -r 57a905038907 xen/include/xen/gdbstub.h
--- a/xen/include/xen/gdbstub.h Mon Mar 6 22:47:53 2006
+++ b/xen/include/xen/gdbstub.h Mon Mar 6 22:49:48 2006
@@ -20,6 +20,9 @@
#ifndef __XEN_GDBSTUB_H__
#define __XEN_GDBSTUB_H__
+
+#include <asm/atomic.h>
+#include <asm/page.h>
#ifdef CRASH_DEBUG
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|