[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xenctx: Add --kernel-start option, to set the user/kernel split



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1274944787 -3600
# Node ID 22ecd71786082c8361f019a5e6f41b8f8a752c8b
# Parent  fa41b06a52a3dd1ec70a5cfe13201f2b47e6fc8b
xenctx: Add --kernel-start option, to set the user/kernel split

Used when displaying stack traces.

Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
---
 tools/xentrace/xenctx.c |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)

diff -r fa41b06a52a3 -r 22ecd7178608 tools/xentrace/xenctx.c
--- a/tools/xentrace/xenctx.c   Wed May 26 10:52:15 2010 +0100
+++ b/tools/xentrace/xenctx.c   Thu May 27 08:19:47 2010 +0100
@@ -65,15 +65,16 @@ struct symbol {
 
 guest_word_t kernel_stext, kernel_etext, kernel_sinittext, kernel_einittext, 
kernel_hypercallpage;
 
+#if defined (__i386__) 
+unsigned long long kernel_start = 0xc0000000;
+#else
+unsigned long long kernel_start = 0xffffffff80000000UL;
+#endif
+
 static int is_kernel_text(guest_word_t addr)
 {
-#if defined (__i386__) || defined (__x86_64__)
     if (symbol_table == NULL)
-        return (addr > ((guest_word_size == 4) ? 0xc000000 : 
0xffffffff80000000ULL));
-#elif defined (__ia64__)
-    if (symbol_table == NULL)
-        return (addr > 0xa000000000000000UL);
-#endif
+        return (addr > kernel_start);
 
     if (addr >= kernel_stext &&
         addr <= kernel_etext)
@@ -909,6 +910,8 @@ static void usage(void)
     printf("  -s SYMTAB, --symbol-table=SYMTAB\n");
     printf("                    read symbol table from SYMTAB.\n");
     printf("  --stack-trace     print a complete stack trace.\n");
+    printf("  -k, --kernel-start\n");
+    printf("                    set user/kernel split. (default 
0xc0000000)\n");
 #ifdef __ia64__
     printf("  -r LIST, --regs=LIST  display more registers.\n");
     printf("  -a --all          same as --regs=tlb,cr,ar,br,bk\n");
@@ -920,7 +923,7 @@ int main(int argc, char **argv)
 int main(int argc, char **argv)
 {
     int ch;
-    static const char *sopts = "fs:ha"
+    static const char *sopts = "fs:hak:"
 #ifdef __ia64__
         "r:"
 #endif
@@ -929,6 +932,7 @@ int main(int argc, char **argv)
         {"stack-trace", 0, NULL, 'S'},
         {"symbol-table", 1, NULL, 's'},
         {"frame-pointers", 0, NULL, 'f'},
+        {"kernel-start", 1, NULL, 'k'},
 #ifdef __ia64__
         {"regs", 1, NULL, 'r'},
 #endif
@@ -988,6 +992,9 @@ int main(int argc, char **argv)
             disp_all = 1;
             break;
 #endif
+        case 'k':
+            kernel_start = strtoull(optarg, NULL, 0);
+            break;
         case 'h':
             usage();
             exit(-1);

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.