[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [IA64] Add a dump command to xenitp
# HG changeset patch # User Alex Williamson <alex.williamson@xxxxxx> # Date 1203945883 25200 # Node ID 07d9e9ca34f007b86d5df5090388551e557bf99f # Parent 3d6e463d08a27f14c6d7bcef0f20cb03d18fb4cb [IA64] Add a dump command to xenitp Signed-off-by: Tristan Gingold <tgingold@xxxxxxx> --- tools/debugger/xenitp/xenitp.c | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+) diff -r 3d6e463d08a2 -r 07d9e9ca34f0 tools/debugger/xenitp/xenitp.c --- a/tools/debugger/xenitp/xenitp.c Fri Feb 22 08:40:32 2008 -0700 +++ b/tools/debugger/xenitp/xenitp.c Mon Feb 25 06:24:43 2008 -0700 @@ -1081,6 +1081,36 @@ cmd_disassemble (char *args) } static enum cmd_status +cmd_dump (char *args) +{ + static unsigned long addr; + unsigned long end_addr = addr + 256; + unsigned long p; + + if (*args != 0) { + if (parse_expr (&args, &addr, 0) < 0) + return CMD_ERROR; + if (*args != 0) { + if (parse_expr (&args, &end_addr, 0) < 0) + return CMD_ERROR; + } + else + end_addr = addr + 256; + } + for (p = addr; p < end_addr; p += 16) { + int i; + printf ("%016lx:", p); + for (i = 0; i < 16; i++) { + unsigned char *m = target_map_memory (p + i); + printf ("%c%02x", i == 8 ? '-' : ' ', *m); + } + printf ("\n"); + } + addr = end_addr; + return CMD_REPEAT; +} + +static enum cmd_status cmd_break (char *args) { unsigned long addr; @@ -1461,6 +1491,7 @@ const struct command_desc commands[] = { { "quit", "quit debugger", cmd_quit }, { "echo", "display parameters", cmd_echo }, { "disassemble", "disassemble memory", cmd_disassemble }, + { "dump", "dump memory", cmd_dump }, { "break", "set a break point", cmd_break }, { "watch", "set a watch point", cmd_watch }, { "cb", "resume until branch", cmd_cb }, _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |