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

Re: [Xen-devel] [PATCH v5 11/17] xenctx: Add -d (--dump-as-stack) <daddr> option to dump memory at daddr as a stack.



On Mon, 2014-03-24 at 11:22 -0400, Don Slutz wrote:
> On 03/21/14 10:57, Ian Campbell wrote:

> > It's starting to seem like print_mem and print_stack should be called
> > from main instead of here. In other words actually have multiple modes
> > instead of tuffing things in as special cases here.
> 
> The issue is that ctx (vcpu_guest_context_any_t) does not exist
> in main and is needed by map_page() (called from these).
> 
> dump_ctx() is the routine that gets this and guest_word_size,
> guest_protected_mode, and ctxt_word_size.
> 
> And so yes, this part of dump_ctx() could be moved to main
> and/or ctx could be made global.
> 
> Let me know if I should rework all this.

It does sound like some refactoring might be in order. Lets get this
series put to bed first though.

> >> ,
> >> @@ -1110,6 +1121,11 @@ int main(int argc, char **argv)
> >>               xenctx.do_memory = 1;
> >>               do_default = 0;
> >>               break;
> >> +        case 'd':
> >> +            xenctx.stk_addr = strtoull(optarg, NULL, 0);
> > You can reuse mem_addr here, can't you?
> >
> >
> >
> Nope.  If both -d and -m are specified, then both are done.

Is that useful?



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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