[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2 07/12] xenctx: Add stack addr to call trace.
From: Don Slutz <Don@xxxxxxxxxxxxxxx> Signed-off-by: Don Slutz <Don@xxxxxxxxxxxxxxx> --- tools/xentrace/xenctx.c | 20 ++++++++++++++------ 1 files changed, 14 insertions(+), 6 deletions(-) diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c index dcf431c..4dc6574 100644 --- a/tools/xentrace/xenctx.c +++ b/tools/xentrace/xenctx.c @@ -700,6 +700,9 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width) printf("Stack Trace:\n"); else printf("Call Trace:\n"); + printf("%s ", width == 8 + ? " " + : " "); printf("%c [<", xenctx.stack_trace ? '*' : ' '); print_stack_word(instr_pointer(ctx), width); printf(">]"); @@ -715,9 +718,10 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width) p = map_page(ctx, vcpu, stack); if (!p) return -1; - printf("| "); + print_stack_word(stack, width); + printf(": | "); print_stack_word(read_stack_word(p, width), width); - printf(" \n"); + printf("\n"); stack += width; } } else { @@ -729,7 +733,8 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width) return -1; frame = read_stack_word(p, width); if (xenctx.stack_trace) { - printf("|-- "); + print_stack_word(stack, width); + printf(": |-- "); print_stack_word(read_stack_word(p, width), width); printf("\n"); } @@ -740,7 +745,8 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width) if (!p) return -1; word = read_stack_word(p, width); - printf("%c [<", xenctx.stack_trace ? '|' : ' '); + print_stack_word(stack, width); + printf(": %c [<", xenctx.stack_trace ? '|' : ' '); print_stack_word(word, width); printf(">]"); print_symbol(word); @@ -756,13 +762,15 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width) return -1; word = read_stack_word(p, width); if (is_kernel_text(word)) { - printf(" [<"); + print_stack_word(stack, width); + printf(": [<"); print_stack_word(word, width); printf(">]"); print_symbol(word); printf("\n"); } else if (xenctx.stack_trace) { - printf(" "); + print_stack_word(stack, width); + printf(": "); print_stack_word(word, width); printf("\n"); } -- 1.7.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |