PATCH: export debugger attached state to XC API
Hi,
the debugger attached state was not available to admin tools. This patch makes this state available in the xc API.
Tristan.
# HG changeset patch
# User Tristan Gingold <[email protected]> # Date 1182655301 -7200
# Node ID dddbacf2e2f5532a4cf73a03066d13e0b52d36c5 # Parent b77b1936227c706a75f727304b641a1de14c6e3f Export debugger attached state to xc API.
Signed-off-by Tristan Gingold <[email protected]>
tools/libxc/xc_domain.c +1 -0
@@ -181,6 +181,7 @@ int xc_domain_getinfo(int xc_handle, info->blocked = !!(domctl.u.getdomaininfo.flags&XEN_DOMINF_blocked); info->running = !!(domctl.u.getdomaininfo.flags&XEN_DOMINF_running); info->hvm = !!(domctl.u.getdomaininfo.flags&XEN_DOMINF_hvm_guest); + info->debugged = !!(domctl.u.getdomaininfo.flags&XEN_DOMINF_debugged); info->shutdown_reason = (domctl.u.getdomaininfo.flags>>XEN_DOMINF_shutdownshift) &
tools/libxc/xenctrl.h +1 -1
@@ -153,7 +153,7 @@ typedef struct xc_dominfo {uint32_t ssidref; unsigned int dying:1, crashed:1, shutdown:1, paused:1, blocked:1, running:1, - hvm:1; + hvm:1, debugged:1;unsigned int shutdown_reason;/* only meaningful if shutdown==1 */ unsigned long nr_pages;unsigned long shared_info_frame;
xen/common/domctl.c +1 -0
@@ -117,6 +117,7 @@ void getdomaininfo(struct domain *d, str (d->is_dying ? XEN_DOMINF_dying :0 ) | (d->is_shut_down ? XEN_DOMINF_shutdown :0 ) | (d->is_paused_by_controller ? XEN_DOMINF_paused :0 ) | + (d->debugger_attached ? XEN_DOMINF_debugged :0 ) | d->shutdown_code << XEN_DOMINF_shutdownshift;if (is_hvm_domain (d) )
xen/include/public/domctl.h +3 -0
@@ -85,6 +85,9 @@ struct xen_domctl_getdomaininfo {/* Domain is currently running. */ #define _XEN_DOMINF_running 5#define XEN_DOMINF_running (1U<<_XEN_DOMINF_running) +/* Being debugged. */ +#define _XEN_DOMINF_debugged 6 +#define XEN_DOMINF_debugged (1U<<_XEN_DOMINF_debugged)/* CPU to which this domain is bound. */ #define XEN_DOMINF_cpumask 255#define XEN_DOMINF_cpushift 8
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel