WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] xenctx: Always show code context, even wh

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xenctx: Always show code context, even when not in kernel mode
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 07 Apr 2009 23:00:39 -0700
Delivery-date: Tue, 07 Apr 2009 23:02:23 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1238495636 -3600
# Node ID b7a11dff84c06fdbb021b9719060b9cadba4d02c
# Parent  192bc11d750653225f3f4a90e078503cdaf003c2
xenctx: Always show code context, even when not in kernel mode

Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
---
 tools/xentrace/xenctx.c |   34 ++++++++++++++++++++--------------
 1 files changed, 20 insertions(+), 14 deletions(-)

diff -r 192bc11d7506 -r b7a11dff84c0 tools/xentrace/xenctx.c
--- a/tools/xentrace/xenctx.c   Tue Mar 31 11:32:56 2009 +0100
+++ b/tools/xentrace/xenctx.c   Tue Mar 31 11:33:56 2009 +0100
@@ -683,12 +683,30 @@ static void print_stack_word(guest_word_
         printf(FMT_64B_WORD, word);
 }
 
+static void print_code(vcpu_guest_context_any_t *ctx, int vcpu)
+{
+    guest_word_t instr;
+    int i;
+
+    printf("Code:\n");
+    instr = instr_pointer(ctx) - 21;
+    for(i=0; i<32; i++) {
+        unsigned char *c = map_page(ctx, vcpu, instr+i);
+        if (instr+i == instr_pointer(ctx))
+            printf("<%02x> ", *c);
+        else
+            printf("%02x ", *c);
+    }
+    printf("\n");
+
+    printf("\n");
+}
+
 static void print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
 {
     guest_word_t stack = stack_pointer(ctx);
     guest_word_t stack_limit;
     guest_word_t frame;
-    guest_word_t instr;
     guest_word_t word;
     guest_word_t *p;
     int i;
@@ -707,19 +725,6 @@ static void print_stack(vcpu_guest_conte
         }
         printf("\n");
     }
-    printf("\n");
-
-    printf("Code:\n");
-    instr = instr_pointer(ctx) - 21;
-    for(i=0; i<32; i++) {
-        unsigned char *c = map_page(ctx, vcpu, instr+i);
-        if (instr+i == instr_pointer(ctx))
-            printf("<%02x> ", *c);
-        else
-            printf("%02x ", *c);
-    }
-    printf("\n");
-
     printf("\n");
 
     if(stack_trace)
@@ -848,6 +853,7 @@ static void dump_ctx(int vcpu)
 #endif
 
     print_ctx(&ctx);
+    print_code(&ctx, vcpu);
 #ifndef NO_TRANSLATION
     if (is_kernel_text(instr_pointer(&ctx)))
         print_stack(&ctx, vcpu, guest_word_size);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xenctx: Always show code context, even when not in kernel mode, Xen patchbot-unstable <=