From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: Check if gdbsx is running Date: Sat, 26 Dec 2015 23:38:38 +0000 Message-ID: <567F24FE.8070309@citrix.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3490676028268945790==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Carl Patenaude Poulin , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --===============3490676028268945790== Content-Type: multipart/alternative; boundary="------------020608070105070005030600" This is a multi-part message in MIME format. --------------020608070105070005030600 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit On 26/12/2015 23:27, Carl Patenaude Poulin wrote: > Hi all, > > I'm writing some development tools for my team. Given a domain ID, > is there a way to programmatically check whether gdbsx is running on > that domain and what port it's running on? I could use something > like `top -b -n 1 | grep gdbsx` but that seems very brittle. With a XEN_DOMCTL_getdomaininfo hypercall, "flags & XEN_DOMINF_debugged" (or xc_dominfo_t.debugged) will tell you whether a debugger is attached to a domain. This is the closest I am aware of you being able to get. Whether gdbsx is running, or what port it is running on, are internal details to the domain running the debugger and not interesting to Xen. If you can assume that all debuggers are run in dom0, then some process list based approach is probably best. ~Andrew --------------020608070105070005030600 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 7bit On 26/12/2015 23:27, Carl Patenaude Poulin wrote:
Hi all,

I'm writing some development tools for my team. Given a domain ID,
is there a way to programmatically check whether gdbsx is running on
that domain and what port it's running on? I could use something
like `top -b -n 1 | grep gdbsx` but that seems very brittle.

With a XEN_DOMCTL_getdomaininfo hypercall, "flags & XEN_DOMINF_debugged" (or xc_dominfo_t.debugged) will tell you whether a debugger is attached to a domain.

This is the closest I am aware of you being able to get.

Whether gdbsx is running, or what port it is running on, are internal details to the domain running the debugger and not interesting to Xen.

If you can assume that all debuggers are run in dom0, then some process list based approach is probably best.

~Andrew
--------------020608070105070005030600-- --===============3490676028268945790== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============3490676028268945790==--