aboutsummaryrefslogtreecommitdiffstats
path: root/tools/debugger
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@hp.com>2008-02-25 06:24:43 -0700
committerAlex Williamson <alex.williamson@hp.com>2008-02-25 06:24:43 -0700
commitc3992d9c07b3cc45aef1e098a27efe2455b1073d (patch)
tree7db783bd36daf64bb64756f6b30604e1da21330d /tools/debugger
parent89224a0296d7dee2c9caab343f0440f1a5841b83 (diff)
downloadxen-c3992d9c07b3cc45aef1e098a27efe2455b1073d.tar.gz
xen-c3992d9c07b3cc45aef1e098a27efe2455b1073d.tar.bz2
xen-c3992d9c07b3cc45aef1e098a27efe2455b1073d.zip
[IA64] Add a dump command to xenitp
Signed-off-by: Tristan Gingold <tgingold@free.fr>
Diffstat (limited to 'tools/debugger')
-rw-r--r--tools/debugger/xenitp/xenitp.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/debugger/xenitp/xenitp.c b/tools/debugger/xenitp/xenitp.c
index 5bd366e4fa..f2f992a983 100644
--- a/tools/debugger/xenitp/xenitp.c
+++ b/tools/debugger/xenitp/xenitp.c
@@ -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 },