direct-io.hg

changeset 15478:05331a29f3cb

Export debugger attached state to xc API.
Signed-off-by: Tristan Gingold <tgingold@free.fr>
author kfraser@localhost.localdomain
date Fri Jul 06 14:42:55 2007 +0100 (2007-07-06)
parents 3196b63a7301
children d49e6a814d9a
files tools/libxc/xc_domain.c tools/libxc/xenctrl.h xen/common/domctl.c xen/include/public/domctl.h
line diff
     1.1 --- a/tools/libxc/xc_domain.c	Fri Jul 06 14:41:05 2007 +0100
     1.2 +++ b/tools/libxc/xc_domain.c	Fri Jul 06 14:42:55 2007 +0100
     1.3 @@ -181,6 +181,7 @@ int xc_domain_getinfo(int xc_handle,
     1.4          info->blocked  = !!(domctl.u.getdomaininfo.flags&XEN_DOMINF_blocked);
     1.5          info->running  = !!(domctl.u.getdomaininfo.flags&XEN_DOMINF_running);
     1.6          info->hvm      = !!(domctl.u.getdomaininfo.flags&XEN_DOMINF_hvm_guest);
     1.7 +        info->debugged = !!(domctl.u.getdomaininfo.flags&XEN_DOMINF_debugged);
     1.8  
     1.9          info->shutdown_reason =
    1.10              (domctl.u.getdomaininfo.flags>>XEN_DOMINF_shutdownshift) &
     2.1 --- a/tools/libxc/xenctrl.h	Fri Jul 06 14:41:05 2007 +0100
     2.2 +++ b/tools/libxc/xenctrl.h	Fri Jul 06 14:42:55 2007 +0100
     2.3 @@ -153,7 +153,7 @@ typedef struct xc_dominfo {
     2.4      uint32_t      ssidref;
     2.5      unsigned int  dying:1, crashed:1, shutdown:1,
     2.6                    paused:1, blocked:1, running:1,
     2.7 -                  hvm:1;
     2.8 +                  hvm:1, debugged:1;
     2.9      unsigned int  shutdown_reason; /* only meaningful if shutdown==1 */
    2.10      unsigned long nr_pages;
    2.11      unsigned long shared_info_frame;
     3.1 --- a/xen/common/domctl.c	Fri Jul 06 14:41:05 2007 +0100
     3.2 +++ b/xen/common/domctl.c	Fri Jul 06 14:42:55 2007 +0100
     3.3 @@ -117,6 +117,7 @@ void getdomaininfo(struct domain *d, str
     3.4          (d->is_dying                ? XEN_DOMINF_dying    : 0) |
     3.5          (d->is_shut_down            ? XEN_DOMINF_shutdown : 0) |
     3.6          (d->is_paused_by_controller ? XEN_DOMINF_paused   : 0) |
     3.7 +        (d->debugger_attached       ? XEN_DOMINF_debugged : 0) |
     3.8          d->shutdown_code << XEN_DOMINF_shutdownshift;
     3.9  
    3.10      if ( is_hvm_domain(d) )
     4.1 --- a/xen/include/public/domctl.h	Fri Jul 06 14:41:05 2007 +0100
     4.2 +++ b/xen/include/public/domctl.h	Fri Jul 06 14:42:55 2007 +0100
     4.3 @@ -85,6 +85,9 @@ struct xen_domctl_getdomaininfo {
     4.4   /* Domain is currently running.            */
     4.5  #define _XEN_DOMINF_running   5
     4.6  #define XEN_DOMINF_running    (1U<<_XEN_DOMINF_running)
     4.7 + /* Being debugged.  */
     4.8 +#define _XEN_DOMINF_debugged  6
     4.9 +#define XEN_DOMINF_debugged   (1U<<_XEN_DOMINF_debugged)
    4.10   /* CPU to which this domain is bound.      */
    4.11  #define XEN_DOMINF_cpumask      255
    4.12  #define XEN_DOMINF_cpushift       8