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@us.ibm.com>
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2006-03-06 23:49:48 +01:00
1 parent 6dab2f670d
commit a5262c4630
2 files changed
+14 -9

No files matched your search

+11 -9
View File
@@ -348,7 +348,10 @@ gdb_cmd_write_mem(unsigned long addr, unsigned long length,
}
}
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 @@ process_command(struct cpu_user_regs *regs, struct gdb_context *ctx)
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 @@ process_command(struct cpu_user_regs *regs, struct gdb_context *ctx)
}
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);
+3
View File
@@ -21,6 +21,9 @@
#ifndef __XEN_GDBSTUB_H__
#define __XEN_GDBSTUB_H__
#include <asm/atomic.h>
#include <asm/page.h>
#ifdef CRASH_DEBUG
/* value <-> char (de)serialzers for arch specific gdb backends */
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.