direct-io.hg

changeset 5715:507ab2973964

Fix xenctx compilation and support 64 bit.
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Mon Jul 11 08:59:01 2005 +0000 (2005-07-11)
parents 25e96ea6e4c5
children 3de8cebfb231
files tools/xentrace/Makefile tools/xentrace/xenctx.c
line diff
     1.1 --- a/tools/xentrace/Makefile	Sun Jul 10 17:32:01 2005 +0000
     1.2 +++ b/tools/xentrace/Makefile	Mon Jul 11 08:59:01 2005 +0000
     1.3 @@ -14,7 +14,7 @@ CFLAGS  += -I $(XEN_LIBXC)
     1.4  HDRS     = $(wildcard *.h)
     1.5  OBJS     = $(patsubst %.c,%.o,$(wildcard *.c))
     1.6  
     1.7 -BIN      = xentrace
     1.8 +BIN      = xentrace xenctx
     1.9  SCRIPTS  = xentrace_format
    1.10  MAN1     = $(wildcard *.1)
    1.11  MAN8     = $(wildcard *.8)
     2.1 --- a/tools/xentrace/xenctx.c	Sun Jul 10 17:32:01 2005 +0000
     2.2 +++ b/tools/xentrace/xenctx.c	Mon Jul 11 08:59:01 2005 +0000
     2.3 @@ -28,22 +28,55 @@ void print_ctx(vcpu_guest_context_t *ctx
     2.4  {
     2.5      struct cpu_user_regs *regs = &ctx1->user_regs;
     2.6  
     2.7 -    printf("eip: %08lx\t", regs->eip);
     2.8 -    printf("esp: %08lx\n", regs->esp);
     2.9 +    printf("eip: %08x\t", regs->eip);
    2.10 +    printf("esp: %08x\n", regs->esp);
    2.11 +
    2.12 +    printf("eax: %08x\t", regs->eax);
    2.13 +    printf("ebx: %08x\t", regs->ebx);
    2.14 +    printf("ecx: %08x\t", regs->ecx);
    2.15 +    printf("edx: %08x\n", regs->edx);
    2.16  
    2.17 -    printf("eax: %08lx\t", regs->eax);
    2.18 -    printf("ebx: %08lx\t", regs->ebx);
    2.19 -    printf("ecx: %08lx\t", regs->ecx);
    2.20 -    printf("edx: %08lx\n", regs->edx);
    2.21 +    printf("esi: %08x\t", regs->esi);
    2.22 +    printf("edi: %08x\t", regs->edi);
    2.23 +    printf("ebp: %08x\n", regs->ebp);
    2.24 +
    2.25 +    printf(" cs: %08x\t", regs->cs);
    2.26 +    printf(" ds: %08x\t", regs->ds);
    2.27 +    printf(" fs: %08x\t", regs->fs);
    2.28 +    printf(" gs: %08x\n", regs->gs);
    2.29 +
    2.30 +}
    2.31 +#elif defined(__x86_64__)
    2.32 +void print_ctx(vcpu_guest_context_t *ctx1)
    2.33 +{
    2.34 +    struct cpu_user_regs *regs = &ctx1->user_regs;
    2.35  
    2.36 -    printf("esi: %08lx\t", regs->esi);
    2.37 -    printf("edi: %08lx\t", regs->edi);
    2.38 -    printf("ebp: %08lx\n", regs->ebp);
    2.39 +    printf("rip: %08lx\t", regs->rip);
    2.40 +    printf("rsp: %08lx\n", regs->rsp);
    2.41 +
    2.42 +    printf("rax: %08lx\t", regs->rax);
    2.43 +    printf("rbx: %08lx\t", regs->rbx);
    2.44 +    printf("rcx: %08lx\t", regs->rcx);
    2.45 +    printf("rdx: %08lx\n", regs->rdx);
    2.46 +
    2.47 +    printf("rsi: %08lx\t", regs->rsi);
    2.48 +    printf("rdi: %08lx\t", regs->rdi);
    2.49 +    printf("rbp: %08lx\n", regs->rbp);
    2.50  
    2.51 -    printf(" cs: %08lx\t", regs->cs);
    2.52 -    printf(" ds: %08lx\t", regs->ds);
    2.53 -    printf(" fs: %08lx\t", regs->fs);
    2.54 -    printf(" gs: %08lx\n", regs->gs);
    2.55 +    printf("r8: %08lx\t", regs->r8);
    2.56 +    printf("r9: %08lx\t", regs->r9);
    2.57 +    printf("r10: %08lx\t", regs->r10);
    2.58 +    printf("r11: %08lx\n", regs->r11);
    2.59 +
    2.60 +    printf("r12: %08lx\t", regs->r12);
    2.61 +    printf("r13: %08lx\t", regs->r13);
    2.62 +    printf("r14: %08lx\t", regs->r14);
    2.63 +    printf("r15: %08lx\n", regs->r15);
    2.64 +
    2.65 +    printf(" cs: %08x\t", regs->cs);
    2.66 +    printf(" ds: %08x\t", regs->ds);
    2.67 +    printf(" fs: %08x\t", regs->fs);
    2.68 +    printf(" gs: %08x\n", regs->gs);
    2.69  
    2.70  }
    2.71  #endif
    2.72 @@ -51,12 +84,11 @@ void print_ctx(vcpu_guest_context_t *ctx
    2.73  void dump_ctx(u32 domid, u32 vcpu)
    2.74  {
    2.75      int ret;
    2.76 -    xc_domaininfo_t info;
    2.77      vcpu_guest_context_t ctx;
    2.78  
    2.79      int xc_handle = xc_interface_open(); /* for accessing control interface */
    2.80  
    2.81 -    ret = xc_domain_getfullinfo(xc_handle, domid, vcpu, &info, &ctx);
    2.82 +    ret = xc_domain_get_vcpu_context(xc_handle, domid, vcpu, &ctx);
    2.83      if (ret != 0) {
    2.84          perror("xc_domain_getfullinfo");
    2.85          exit(-1);