|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 13/15] xenctx: Add convert of more registers to symbols
>>> On 18.03.14 at 23:15, Don Slutz <dslutz@xxxxxxxxxxx> wrote:
> --- a/tools/xentrace/xenctx.c
> +++ b/tools/xentrace/xenctx.c
> @@ -333,10 +333,14 @@ static void print_special(void *regs, const char *name,
> unsigned int mask, int w
> printf("\n");
> for (i = 0; mask; mask >>= 1, ++i)
> if (mask & 1) {
> - if (width == 4)
> - printf("%s%u: %08"PRIx32"\n", name, i, ((uint32_t *)
> regs)[i]);
> - else
> - printf("%s%u: %08"PRIx64"\n", name, i, ((uint64_t *)
> regs)[i]);
> + if (width == 4) {
> + printf("%s%u: %08"PRIx32, name, i, ((uint32_t *) regs)[i]);
> + print_symbol(((uint32_t *) regs)[i], KERNEL_DATA_ADDR);
> + } else {
> + printf("%s%u: %016"PRIx64, name, i, ((uint64_t *) regs)[i]);
> + print_symbol(((uint64_t *) regs)[i], KERNEL_DATA_ADDR);
> + }
> + printf("\n");
I don't think this is reasonable for all special registers, and hence
I think you ought to pass in a flag indicating whether the register
is holding some sort of address (which may become further
complicated if only part of a register forms an address, so maybe
passing in a mask would be even better, with the mask being zero
indicating that this isn't an address at all).
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |