All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arun Sharma <arun.sharma@intel.com>
To: Ian Pratt <Ian.Pratt@cl.cam.ac.uk>,
	Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com
Subject: [PATCH][1/5] Fix xenctx compilation and support 64 bit.
Date: Sun, 10 Jul 2005 11:59:51 -0700	[thread overview]
Message-ID: <20050710185951.GA12004@intel.com> (raw)

Fix xenctx compilation and support 64 bit.

Signed-off-by: Arun Sharma <arun.sharma@intel.com>

--- a/tools/xentrace/Makefile	Wed Jul  6 21:33:25 2005
+++ b/tools/xentrace/Makefile	Wed Jul  6 22:39:17 2005
@@ -14,7 +14,7 @@
 HDRS     = $(wildcard *.h)
 OBJS     = $(patsubst %.c,%.o,$(wildcard *.c))
 
-BIN      = xentrace
+BIN      = xentrace xenctx
 SCRIPTS  = xentrace_format
 MAN1     = $(wildcard *.1)
 MAN8     = $(wildcard *.8)
diff -r 1d5b35c1e60c -r 2d1eefd20f84 tools/xentrace/xenctx.c
--- a/tools/xentrace/xenctx.c	Wed Jul  6 21:33:25 2005
+++ b/tools/xentrace/xenctx.c	Wed Jul  6 22:39:17 2005
@@ -28,22 +28,55 @@
 {
     struct cpu_user_regs *regs = &ctx1->user_regs;
 
-    printf("eip: %08lx\t", regs->eip);
-    printf("esp: %08lx\n", regs->esp);
+    printf("eip: %08x\t", regs->eip);
+    printf("esp: %08x\n", regs->esp);
 
-    printf("eax: %08lx\t", regs->eax);
-    printf("ebx: %08lx\t", regs->ebx);
-    printf("ecx: %08lx\t", regs->ecx);
-    printf("edx: %08lx\n", regs->edx);
+    printf("eax: %08x\t", regs->eax);
+    printf("ebx: %08x\t", regs->ebx);
+    printf("ecx: %08x\t", regs->ecx);
+    printf("edx: %08x\n", regs->edx);
 
-    printf("esi: %08lx\t", regs->esi);
-    printf("edi: %08lx\t", regs->edi);
-    printf("ebp: %08lx\n", regs->ebp);
+    printf("esi: %08x\t", regs->esi);
+    printf("edi: %08x\t", regs->edi);
+    printf("ebp: %08x\n", regs->ebp);
 
-    printf(" cs: %08lx\t", regs->cs);
-    printf(" ds: %08lx\t", regs->ds);
-    printf(" fs: %08lx\t", regs->fs);
-    printf(" gs: %08lx\n", regs->gs);
+    printf(" cs: %08x\t", regs->cs);
+    printf(" ds: %08x\t", regs->ds);
+    printf(" fs: %08x\t", regs->fs);
+    printf(" gs: %08x\n", regs->gs);
+
+}
+#elif defined(__x86_64__)
+void print_ctx(vcpu_guest_context_t *ctx1)
+{
+    struct cpu_user_regs *regs = &ctx1->user_regs;
+
+    printf("rip: %08lx\t", regs->rip);
+    printf("rsp: %08lx\n", regs->rsp);
+
+    printf("rax: %08lx\t", regs->rax);
+    printf("rbx: %08lx\t", regs->rbx);
+    printf("rcx: %08lx\t", regs->rcx);
+    printf("rdx: %08lx\n", regs->rdx);
+
+    printf("rsi: %08lx\t", regs->rsi);
+    printf("rdi: %08lx\t", regs->rdi);
+    printf("rbp: %08lx\n", regs->rbp);
+
+    printf("r8: %08lx\t", regs->r8);
+    printf("r9: %08lx\t", regs->r9);
+    printf("r10: %08lx\t", regs->r10);
+    printf("r11: %08lx\n", regs->r11);
+
+    printf("r12: %08lx\t", regs->r12);
+    printf("r13: %08lx\t", regs->r13);
+    printf("r14: %08lx\t", regs->r14);
+    printf("r15: %08lx\n", regs->r15);
+
+    printf(" cs: %08x\t", regs->cs);
+    printf(" ds: %08x\t", regs->ds);
+    printf(" fs: %08x\t", regs->fs);
+    printf(" gs: %08x\n", regs->gs);
 
 }
 #endif
@@ -51,12 +84,11 @@
 void dump_ctx(u32 domid, u32 vcpu)
 {
     int ret;
-    xc_domaininfo_t info;
     vcpu_guest_context_t ctx;
 
     int xc_handle = xc_interface_open(); /* for accessing control interface */
 
-    ret = xc_domain_getfullinfo(xc_handle, domid, vcpu, &info, &ctx);
+    ret = xc_domain_get_vcpu_context(xc_handle, domid, vcpu, &ctx);
     if (ret != 0) {
         perror("xc_domain_getfullinfo");
         exit(-1);

             reply	other threads:[~2005-07-10 18:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-10 18:59 Arun Sharma [this message]
2005-07-10 21:30 ` [PATCH][1/5] Fix xenctx compilation and support 64 bit David Hopwood
  -- strict thread matches above, loose matches on Subject: below --
2005-07-10 21:49 Ian Pratt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050710185951.GA12004@intel.com \
    --to=arun.sharma@intel.com \
    --cc=Ian.Pratt@cl.cam.ac.uk \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.